CakePHP 4 - 1/4 Install and Configure Inertia and React in an Existing BootstrapUI Application

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • Covers installing InertiaJS CakePHP 4 adaptor, Moving vendor code in to plugins/ so you can modify it to your hearts content, implementing a persistent InertiaJS Layout in React.

Комментарии • 4

  • @Nathanael-g3g
    @Nathanael-g3g 5 месяцев назад

    First of all, thank you very much for this detailed tutorial! I've got a question regarding the layout. At 50:50, you delete all the PHP code from the layout. However, in my project I'm using quite a few CakePHP elements (e.g. header, nav-bar, sidebar etc.) to assemble my layout in a structured way. How can I still use these elements, when configuring the layout with Intertia?

  • @itachielarbi3304
    @itachielarbi3304 4 месяца назад

    any idea how generate ssr with inertia cakephp i create plugin work fine with vite inertia but i failed to generate ssr thank you

  • @KevinPfeifer
    @KevinPfeifer Год назад

    damn... thats quite the effort to get that running. Especially the fact that currently one needs to copy the plugin from vendor to the private plugins section to adjust the View class.
    Could this missing functionality be generalized and added as a PR to the existing plugin?

    • @toggenation
      @toggenation  Год назад

      Hi Kevin, I agree it was a lot of effort. I have sent a PR for both AssetMix (To allow resolving the location of app.js when CakePHP is served from a subdir and Asset.timestamps are switched on) and Inertia plugin ( provides viewVars to the CakePHP template / layouts for use in legacy menus and HTML).
      I'm a n00b when it comes to PR's so hopefully it will make sense to Ishan and be useful.