PHP code example of toanld / modules-inertia

1. Go to this page and download the library: Download toanld/modules-inertia library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

toanld / modules-inertia example snippets



'web' => [
    // ...
    \App\Http\Middleware\HandleInertiaRequests::class,
],


 'Pages/Index' => 'Resources/Pages/Index.vue',
 //...
 'source' => 'Resources/Pages',

    public function some_method()
    {
        return Inertia::module('module_name::file_name');
        //
        return Inertia::module('module_name::file_name', ['data'=>'some data']);
        //
        return Inertia::module('module_name::directory_name.file_name', ['data'=>'some data']);
    }

php artisan vendor:publish --provider="Dongrim\ModulesInertia\ModulesInertiaServiceProvider"