{"id":20934461,"url":"https://github.com/jaxon-php/jaxon-blade","last_synced_at":"2025-08-19T23:07:52.472Z","repository":{"id":56997031,"uuid":"90319435","full_name":"jaxon-php/jaxon-blade","owner":"jaxon-php","description":"Jaxon view renderer for Blade templates","archived":false,"fork":false,"pushed_at":"2025-07-22T13:59:45.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T15:38:32.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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,"zenodo":null}},"created_at":"2017-05-04T23:50:16.000Z","updated_at":"2025-07-22T13:51:12.000Z","dependencies_parsed_at":"2024-07-25T07:53:20.432Z","dependency_job_id":"1f97860f-6843-47ec-8c25-9045e61b1ac9","html_url":"https://github.com/jaxon-php/jaxon-blade","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jaxon-php/jaxon-blade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-blade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-blade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-blade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-blade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaxon-php","download_url":"https://codeload.github.com/jaxon-php/jaxon-blade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxon-php%2Fjaxon-blade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271236280,"owners_count":24723978,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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.764Z","updated_at":"2025-08-19T23:07:52.462Z","avatar_url":"https://github.com/jaxon-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Jaxon View for Blade\n====================\n\nRender Blade templates in Jaxon applications.\n\nInstallation\n------------\n\nInstall this package with Composer.\n\n```json\n\"require\": {\n    \"jaxon-php/jaxon-blade\": \"^5.0\"\n}\n```\n\nUsage\n-----\n\nFor each directory containing Blade templates, add an entry to the `app.views` section in the configuration.\n\n```php\n    'app' =\u003e [\n        'views' =\u003e [\n            'demo' =\u003e [\n                'directory' =\u003e '/path/to/demo/views',\n                'extension' =\u003e '.blade.php',\n                'renderer' =\u003e 'blade',\n            ],\n        ],\n    ],\n```\n\nIn the following example, the DOM element with id `content-id` is assigned the value of the `/path/to/demo/views/sub/dir/file.blade.php` template.\n\n```php\nclass MyClass extends \\Jaxon\\App\\FuncComponent\n{\n    public function action()\n    {\n        $this-\u003eresponse-\u003ehtml('content-id', $this-\u003eview()-\u003erender('demo::/sub/dir/file'));\n    }\n}\n```\n\nBlade directives\n----------------\n\nThis extension registers the following Blade directives to insert Jaxon js and css codes in the pages that need to show Jaxon related content.\n\n```php\n// /path/to/demo/views/sub/dir/file.blade.php\n\n\u003c!-- In page header --\u003e\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@jxnJs()\n\n@jxnScript()\n```\n\nCall factories\n--------------\n\nThis extension registers the following Blade directives for Jaxon [call factories](https://www.jaxon-php.org/docs/v5x/ui-features/call-factories.html) functions.\n\n\u003e [!NOTE]\n\u003e In the following examples, the `$rqAppTest` template variable is set to the value `rq(Demo\\Ajax\\App\\AppTest::class)`.\n\nThe `jxnBind` directive attaches a UI component to a DOM element, while the `jxnHtml` directive displays a component HTML code in a view.\n\n```php\n    \u003cdiv class=\"col-md-12\" @jxnBind($rqAppTest)\u003e\n        @jxnHtml($rqAppTest)\n    \u003c/div\u003e\n```\n\nThe `jxnPagination` directive displays pagination links in a view.\n\n```php\n    \u003cdiv class=\"col-md-12\" @jxnPagination($rqAppTest)\u003e\n    \u003c/div\u003e\n```\n\nThe `jxnOn` directive binds an event on a DOM element to a Javascript call defined with a `call factory`.\n\n```php\n    \u003cselect class=\"form-select\"\n        @jxnOn('change', $rqAppTest-\u003esetColor(jq()-\u003eval()))\u003e\n        \u003coption value=\"black\" selected=\"selected\"\u003eBlack\u003c/option\u003e\n        \u003coption value=\"red\"\u003eRed\u003c/option\u003e\n        \u003coption value=\"green\"\u003eGreen\u003c/option\u003e\n        \u003coption value=\"blue\"\u003eBlue\u003c/option\u003e\n    \u003c/select\u003e\n```\n\nThe `jxnClick` directive is a shortcut to define a handler for the `click` event.\n\n```php\n    \u003cbutton type=\"button\" class=\"btn btn-primary\"\n        @jxnClick($rqAppTest-\u003esayHello(true))\u003eClick me\u003c/button\u003e\n```\n\nThe `jxnEvent` directive defines a set of events handlers on the children of a DOM element, using `jQuery` selectors.\n\n```php\n    \u003cdiv class=\"row\" @jxnEvent([\n        ['.app-color-choice', 'change', $rqAppTest-\u003esetColor(jq()-\u003eval())]\n        ['.ext-color-choice', 'change', $rqExtTest-\u003esetColor(jq()-\u003eval())]\n    ])\u003e\n        \u003cdiv class=\"col-md-12\"\u003e\n            \u003cselect class=\"form-control app-color-choice\"\u003e\n                \u003coption value=\"black\" selected=\"selected\"\u003eBlack\u003c/option\u003e\n                \u003coption value=\"red\"\u003eRed\u003c/option\u003e\n                \u003coption value=\"green\"\u003eGreen\u003c/option\u003e\n                \u003coption value=\"blue\"\u003eBlue\u003c/option\u003e\n            \u003c/select\u003e\n        \u003c/div\u003e\n        \u003cdiv class=\"col-md-12\"\u003e\n            \u003cselect class=\"form-control ext-color-choice\"\u003e\n                \u003coption value=\"black\" selected=\"selected\"\u003eBlack\u003c/option\u003e\n                \u003coption value=\"red\"\u003eRed\u003c/option\u003e\n                \u003coption value=\"green\"\u003eGreen\u003c/option\u003e\n                \u003coption value=\"blue\"\u003eBlue\u003c/option\u003e\n            \u003c/select\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n```\n\nThe `jxnEvent` directive takes as parameter an array in which each entry is an array with a `jQuery` selector, an event and a `call factory`.\n\nContribute\n----------\n\n- Issue Tracker: github.com/jaxon-php/jaxon-blade/issues\n- Source Code: github.com/jaxon-php/jaxon-blade\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-blade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaxon-php%2Fjaxon-blade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaxon-php%2Fjaxon-blade/lists"}