Download the PHP package tiagof2/laravel-easyblade without Composer
On this page you can find all versions of the php package tiagof2/laravel-easyblade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tiagof2/laravel-easyblade
More information about tiagof2/laravel-easyblade
Files in tiagof2/laravel-easyblade
Package laravel-easyblade
Short Description Create a easier & readable Blade view with EasyBlade [fork]
License MIT
Informations about the package laravel-easyblade
laravel EasyBlade
You can create a simpler and more readable view with EasyBlade
Installation
Usage
Using EasyBlade is, just like its name, super easy!
Imagine that you want to write a route URL in a href in Blade You will have to write this code :
But by using EasyBlade, Just write :
and don't use "{{ }}" or any pure PHP code
Blade template engine was not created for pure PHP code, rather, it was created to code easier. You can pass it by EasyBlade
Current Directives :
@asset('foo')
@url('foo')
@route('foo')
@isActive('routeName', 'active', 'deactive')
@count(array|collection, number )
@user(attr)
@sessionExists('name')
@session('name')
@image('address', 'cssClasses')
@style('style.css')
@script('script.js')
@config('app.name', 'Laravel')
@old('name', 'Reza')
Features :
- You can pass a route name or array of route names as first parameters to 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
- 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.
Examples :
-
@count
-
@isActive
Imagine current route is :dashboard.home
-
@asset
-
@route
-
@url
-
@user
-
@sessionExists
-
@session
-
@image
-
@old
-
@script
@style
Using this GIT repo on composer.json
v0.6.x
is compatible with Laravelv10.x
. It has not been tested in version 11.x but it should work well
All versions of laravel-easyblade with dependencies
illuminate/support Version ^8.0|^9.0|^10.0
laravel/framework Version ^8.0|^9.0|^10.0