{"id":13527835,"url":"https://github.com/clickcoder/slim-blade","last_synced_at":"2025-04-01T10:32:53.208Z","repository":{"id":18842880,"uuid":"22058796","full_name":"clickcoder/slim-blade","owner":"clickcoder","description":"Blade is a simple, yet powerful templating engine provided for the Slim Framework","archived":false,"fork":false,"pushed_at":"2014-07-22T19:37:11.000Z","size":215,"stargazers_count":32,"open_issues_count":6,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T08:24:19.886Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clickcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-21T09:28:20.000Z","updated_at":"2021-05-24T12:53:36.000Z","dependencies_parsed_at":"2022-08-19T15:00:06.703Z","dependency_job_id":null,"html_url":"https://github.com/clickcoder/slim-blade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clickcoder%2Fslim-blade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clickcoder%2Fslim-blade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clickcoder%2Fslim-blade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clickcoder%2Fslim-blade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clickcoder","download_url":"https://codeload.github.com/clickcoder/slim-blade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246625693,"owners_count":20807803,"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-08-01T06:02:03.212Z","updated_at":"2025-04-01T10:32:52.963Z","avatar_url":"https://github.com/clickcoder.png","language":"PHP","readme":"slim-blade\n==========\n\nBlade is the default template engine of Laravel. The main advantage of Blade is template inheritance whilst using plain PHP. This package allows you to use Blade within the Slim Framework.\n\n## How to Install\n\n#### using [Composer](http://getcomposer.org/)\n\nThe package can be installed via Composer by requiring the \"clickcoder/slim-blade\": \"dev-master\" package in your project's composer.json.\n    \n```json\n{\n    \"require\": {\n        \"clickcoder/slim-blade\": \"dev-master\"\n    }\n}\n```\n\nThen run the following composer command:\n\n```bash\n$ php composer.phar install\n```\n\n## Blade\n\n### How to use\n    \n```php\n\u003c?php\nrequire 'vendor/autoload.php';\n\n$app = new \\Slim\\Slim(array(\n    'view' =\u003e new \\Slim\\Views\\Blade(),\n\t'templates.path' =\u003e './templates',\n));\n```\n\nTo use Blade cache do the following:\n    \n```php\n$view = $app-\u003eview();\n$view-\u003eparserOptions = array(\n    'debug' =\u003e true,\n    'cache' =\u003e dirname(__FILE__) . '/cache'\n);\n```\n\nYou can use all blade features as described in the Laravel 4 documentation: http://laravel.com/docs/templates#blade-templating\n\n### Example\n\nCreate the following index.php file\n\n```php\n\u003c?php\nrequire 'vendor/autoload.php';\n\n$app = new \\Slim\\Slim(array(\n    'view' =\u003e new \\Slim\\Views\\Blade(),\n\t'templates.path' =\u003e './templates',\n));\n\n$view = $app-\u003eview();\n$view-\u003eparserOptions = array(\n    'debug' =\u003e true,\n    'cache' =\u003e dirname(__FILE__) . '/cache'\n);\n\n$app-\u003eget('/hello/:name', function ($name) use ($app) {\n\t$app-\u003erender('master', array(\n\t\t'variable' =\u003e  \"Hello, $name\"\n\t));\n});\n\n$app-\u003erun();\n```\n\nCreate a `templates` folder and add this inside\n\n```php\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n    \u003cbody\u003e\n\t\t{{ $variable }}\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\nvisit /index.php/hello/world\n\n## Authors\n\n[Kevin Darren](https://github.com/clickcoder)\n\n## License\n\nMIT Public License","funding_links":[],"categories":["PHP","Packages and Middleware"],"sub_categories":["Videos"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickcoder%2Fslim-blade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclickcoder%2Fslim-blade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickcoder%2Fslim-blade/lists"}