PHP code example of jaxon-php / jaxon-laravel

1. Go to this page and download the library: Download jaxon-php/jaxon-laravel 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/ */

    

jaxon-php / jaxon-laravel example snippets


php artisan vendor:publish --tag=config

Route::get('/', [DemoController::class, 'index'])->name('demo')->middleware(['web', 'jaxon.config']);

    'app' => [
        'request' => [
            'route' => 'jaxon',
            'middlewares' => ['web'],
        ],
    ],

class DemoController extends Controller
{
    public function index()
    {
        // Print the page
        return view('demo/index', [
            'pageTitle' => "Laravel Framework",
        ]);
    }
}

// resources/views/demo/index.blade.php

<!-- In page header -->

@jxnCss()
</head>

<body>

<!-- Page content here -->

</body>

<!-- In page footer -->

@jxnJs()

@jxnScript()

namespace Jaxon\App;

class HelloWorld extends \Jaxon\App\CallableClass
{
    public function sayHello()
    {
        $this->response->assign('div2', 'innerHTML', 'Hello World!');
        return $this->response;
    }
}
json
""jaxon-php/jaxon-laravel": "^5.0"
}