{"id":17024668,"url":"https://github.com/reziamini/laravel-easyblade","last_synced_at":"2026-01-11T09:00:37.187Z","repository":{"id":46073058,"uuid":"303465247","full_name":"reziamini/laravel-easyblade","owner":"reziamini","description":"Create an easier \u0026 readable Blade (view) in Laravel with EasyBlade","archived":false,"fork":false,"pushed_at":"2023-11-24T07:06:58.000Z","size":54,"stargazers_count":74,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-06T20:13:12.660Z","etag":null,"topics":["blade","laravel","laravel-blade","laravel-easyblade","laravel-package","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reziamini.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}},"created_at":"2020-10-12T17:30:56.000Z","updated_at":"2025-07-29T09:29:57.000Z","dependencies_parsed_at":"2024-03-09T05:01:36.510Z","dependency_job_id":"b75d72a4-b7ba-4aca-a777-d6b84e159df7","html_url":"https://github.com/reziamini/laravel-easyblade","commit_stats":null,"previous_names":["reziamini/laravel-easyblade","rezaamini-ir/laravel-easyblade"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/reziamini/laravel-easyblade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-easyblade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-easyblade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-easyblade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-easyblade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reziamini","download_url":"https://codeload.github.com/reziamini/laravel-easyblade/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reziamini%2Flaravel-easyblade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28298875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T08:21:30.231Z","status":"ssl_error","status_checked_at":"2026-01-11T08:21:26.882Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blade","laravel","laravel-blade","laravel-easyblade","laravel-package","php"],"created_at":"2024-10-14T07:26:31.687Z","updated_at":"2026-01-11T09:00:37.118Z","avatar_url":"https://github.com/reziamini.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rezaamini-ir/laravel-easyblade/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rezaamini-ir/laravel-easyblade/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/rezaamini-ir/laravel-easyblade/badges/build.png?b=master)](https://scrutinizer-ci.com/g/rezaamini-ir/laravel-easyblade/build-status/master)\n\n# laravel EasyBlade\n\nYou can create a simpler and more readable view with EasyBlade\n\n# Installation\n\n```\ncomposer require rezaamini-ir/laravel-easyblade\n```\n\n# Usage\n\nUsing EasyBlade is, just like its name, super easy!\n\nImagine that you want to write a route URL in a href in Blade\nYou will have to write this code : \n```html\n    \u003ca href=\"{{ route('home') }}\"\u003e\u003c/a\u003e\n```\nBut by using EasyBlade,\nJust write :\n```html\n    \u003ca href=\"@route('home')\"\u003e\u003c/a\u003e\n```\nand don't use \"{{ }}\" or any pure PHP code\n\n\nBlade template engine was not created for pure PHP code, rather, it was created to code easier. You can pass it by EasyBlade\n\n## Current Directives :\n\n- `@asset('foo')`\n- `@url('foo')`\n- `@route('foo')`\n- `@isActive('routeName', 'active', 'deactive')`\n- `@count(array|collection, number )`\n- `@user(attr)`\n- `@sessionExists('name')`\n- `@session('name')`\n- `@image('address', 'cssClasses')`\n- `@style('style.css')`\n- `@script('script.js')`\n- `@config('app.name', 'Laravel')`\n- `@old('name', 'Reza')`\n\n## Features :\n - You can pass a route name or array of route names as first parameters to```@isActive``` directive , second parameter is a string which you want to echo in view and third parameter is an optional param and it will return a null string if nothing was passed , It will be showed when the current route is not equal to array or string which passed as first param\n - You can use `@count` directive instead of writing lots of if statements to check if the count of the collection or array is equal to or greater than your number which was passed to the second param.\n \n## Examples : \n- `@count`\n```blade\n    @count([1, 2, 3], 3)\n        something\n    @endcount\n    // return `something` because count of array is equal 3\n```\n\n```blade\n    @count([1, 2], 3)\n        true\n    @endcount\n    // return null because count of array is smaler than 3\n```\n\n- `@isActive` Imagine current route is : `dashboard.home`\n```blade\n    @isActive('dashboard.home', 'active', 'deactive')\n    // Return : active\n```\n```blade\n    @isActive(['dashboard.home', 'dahboard.profile'], 'active', 'deactive')\n    // Return : active\n```\n```blade\n    @isActive('home', 'active', 'deactive')\n    // Return : deactive\n```\n\n- `@asset` \n```blade\n    @asset('img/header.png')\n    \n    // Return : http://127.0.0.1/img/header.png (Like asset() helper )\n```\n- `@route` \n```blade\n    @route('dashboard')\n    \n    // Return : http://127.0.0.1/dashboard (Like route('routeName') helper )\n```\n\n- `@url` \n```blade\n    @url('/home')\n    \n    // Return : http://127.0.0.1/home (Like url('address') helper )\n```\n\n- `@user` \n```blade\n    @user('name')\n    \n   // It will run auth()-\u003euser()-\u003ename and return user's name\n   // You don't need to check user is authenticated or not , it will check by itself\n\n```\n- `@sessionExists`\n\n```blade\n    @sessionExists('foo')\n        Session Exists\n    @endsessionExists\n    \n    // It will run session()-\u003eexists('foo') in a condition\n```\n\n- `@session`\n\n```blade\n    @session('name')\n    \n    // First it will check session exists then it will print value of session \n```\n\n- `@image`\n\n```blade\n    @image('img/img1.png', 'img-fuild rounded-circle')\n    \n    // Return a img tag with http://domain/img/img1.png file and 'img-fuild rounded-circle' class\n```\n\n- `@old`\n```blade\n    @old('name', $user-\u003ename)\n    \n    // Return something like : {{ old('name', $user-\u003ename) }}\n```\n\n- `@script`\n```blade\n    @script('/js/script.js')\n    // Return script tag : \u003cscript src=\"/js/script.js\"\u003e\u003c/script\u003e\n      \n    @script('/js/script.js', true) // Second and third parameter is optional\n    // Return script tag with defer : \u003cscript src=\"/js/script.js\" defer\u003e\u003c/script\u003e  \n```\n\n- `@style`\n```blade\n    @style('/css/app.css')\n    // Return link tag : \u003clink rel=\"stylesheet\" href=\"/css/app.css\"\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freziamini%2Flaravel-easyblade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freziamini%2Flaravel-easyblade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freziamini%2Flaravel-easyblade/lists"}