Download the PHP package flyo/nitro-laravel without Composer
On this page you can find all versions of the php package flyo/nitro-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nitro-laravel
Flyo Nitro Laravel Framework Module
publish the config
Adjust the token in config/flyo.php
Ensure to remove the default routes in
routes/web.php
which could conflict with the cms routes.
Views
Add/Adjust the cms.blade.php
view file in resources/views
, this is where the cms page loader starts:
Now all component block views are looked up in ressources/views/flyo
, for example if you have a Flyo Nitro component block with name Text the view file would be ressources/views/flyo/Text.blade.php
utilizing the following variables:
You can adjust the views namespace in the config file using
views_namespace
key.
To make the block editable (which means clicking in the block, will correctly add the block to the cms editor) you can use the following blade directive @editable($block)
:
Layout Variable
In order to build menus, the $config
response from the api is a global available variable, for example this could be used in layout-components:
Make sure to include the <x-flyo::head>
component in the head of your layout file, for example
This will add needed javascript for reloading and editin blocks in local environments and also assign all available meta informations.
A full layout example which could be placed in resources/views/layouts/app.blade.php
:
Entity Detail
To display an entity detail page, you have to register a route, create a controller and a view file:
Routing File example
The Controller:
And the example tier.blade.php
in the resources/views
folder:
There is also a more generic controller available which can be used to display any entity detail page:
where the poi.blade.php
file in the resources/views
folder could look like this:
Misc
In order to resolve the Configuration object somewhere in your application, you can use the following code:
Same for the page response
Documentation
Package Development
- Check the
example-app/.env
file to have a correct flyo token. - Go to example-app and run
php artisan serve
to get the example app running.
All versions of nitro-laravel with dependencies
illuminate/support Version ^11.0
illuminate/view Version ^11
laravel/helpers Version ^1.6
flyo/nitro-php-bridge Version ^1.2