{"id":20934462,"url":"https://github.com/jaxon-php/jaxon-laravel","last_synced_at":"2025-05-13T20:31:21.362Z","repository":{"id":50617282,"uuid":"60431766","full_name":"jaxon-php/jaxon-laravel","owner":"jaxon-php","description":"Jaxon library integration for the Laravel framework https://www.jaxon-php.org.","archived":false,"fork":false,"pushed_at":"2024-12-14T12:54:22.000Z","size":110,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T10:03:14.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaxon-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-04T21:53:06.000Z","updated_at":"2024-12-14T12:54:25.000Z","dependencies_parsed_at":"2024-07-25T07:53:15.933Z","dependency_job_id":"36d38483-4cc3-4620-a2ad-e449d1f8962a","html_url":"https://github.com/jaxon-php/jaxon-laravel","commit_stats":{"total_commits":138,"total_committers":1,"mean_commits":138.0,"dds":0.0,"last_synced_commit":"a6082cbc97482f2451a6f2059f56b4c8d455b1d2"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaxon-php","download_url":"https://codeload.github.com/jaxon-php/jaxon-laravel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020903,"owners_count":22000806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T22:09:26.778Z","updated_at":"2025-05-13T20:31:20.977Z","avatar_url":"https://github.com/jaxon-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Jaxon integration for Laravel\n=============================\n\nThis package integrates the [Jaxon library](https://github.com/jaxon-php/jaxon-core) into the Laravel framework.\nIt works with Laravel version 7 or newer.\n\nInstallation\n------------\n\nAdd the following lines in the `composer.json` file, and run the `composer update` command.\n```json\n\"require\": {\n    \"jaxon-php/jaxon-laravel\": \"^5.0\"\n}\n```\n\nPublish the package configuration.\n```php\nphp artisan vendor:publish --tag=config\n```\n\nRouting and middlewares\n-----------------------\n\nThe library automatically registers two middlewares, `jaxon.config` and, 'jaxon.ajax'.\n\nThe `jaxon.config` middleware must be added to the routes to pages that need to show Jaxon related content.\n\n```php\nRoute::get('/', [DemoController::class, 'index'])-\u003ename('demo')-\u003emiddleware(['web', 'jaxon.config']);\n```\n\nIt can also be configured to register its route and the associated middlewares by adding the `route` and `middlewares` options in the `config/jaxon.php` file.\n\n```php\n    'app' =\u003e [\n        'request' =\u003e [\n            'route' =\u003e 'jaxon',\n            'middlewares' =\u003e ['web'],\n        ],\n    ],\n```\n\nConfiguration\n-------------\n\nThe settings in the `jaxon.php` config file are separated into two sections.\nThe options in the `lib` section are those of the Jaxon core library, while the options in the `app` sections are those of the Laravel application.\n\nThe following options can be defined in the `app` section of the config file.\n\n| Name | Description |\n|------|---------------|\n| directories | An array of directory containing Jaxon application classes |\n| views   | An array of directory containing Jaxon application views |\n| | | |\n\nBy default, the `views` array is empty. Views are rendered from the framework default location.\nThere's a single entry in the `directories` array with the following values.\n\n| Name | Default value | Description |\n|------|---------------|-------------|\n| directory | app_path('Jaxon/App') | The directory of the Jaxon classes |\n| namespace | \\Jaxon\\App  | The namespace of the Jaxon classes |\n| separator | .           | The separator in Jaxon class names |\n| protected | empty array | Prevent Jaxon from exporting some methods |\n| | | |\n\nThe `route` option is overriden by the `core.request.uri` option of the Jaxon library.\n\nUsage\n-----\n\nInsert Jaxon js and css codes in the pages that need to show Jaxon related content, using the `Blade` functions provided by the Jaxon package.\n\n```php\nclass DemoController extends Controller\n{\n    public function index()\n    {\n        // Print the page\n        return view('demo/index', [\n            'pageTitle' =\u003e \"Laravel Framework\",\n        ]);\n    }\n}\n```\n\n```php\n// resources/views/demo/index.blade.php\n\n\u003c!-- In page header --\u003e\n\n@jxnCss()\n\u003c/head\u003e\n\n\u003cbody\u003e\n\n\u003c!-- Page content here --\u003e\n\n\u003c/body\u003e\n\n\u003c!-- In page footer --\u003e\n\n@jxnJs()\n\n@jxnScript()\n```\n\n### The Jaxon classes\n\nThe Jaxon classes can inherit from `\\Jaxon\\App\\CallableClass`.\nBy default, they are located in the `app/Jaxon/App` dir of the Laravel application, and the associated namespace is `\\Jaxon\\App`.\n\nThis is a simple example of a Jaxon class, defined in the `app/Jaxon/App/HelloWorld.php` file.\n\n```php\nnamespace Jaxon\\App;\n\nclass HelloWorld extends \\Jaxon\\App\\CallableClass\n{\n    public function sayHello()\n    {\n        $this-\u003eresponse-\u003eassign('div2', 'innerHTML', 'Hello World!');\n        return $this-\u003eresponse;\n    }\n}\n```\n\nContribute\n----------\n\n- Issue Tracker: github.com/jaxon-php/jaxon-laravel/issues\n- Source Code: github.com/jaxon-php/jaxon-laravel\n\nLicense\n-------\n\nThe package is licensed under the BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaxon-php%2Fjaxon-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaxon-php%2Fjaxon-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaxon-php%2Fjaxon-laravel/lists"}