laravel-support maintained by bram1028
Description
Adds common functionality to Laravel.
Author
Last update
2021/03/30 21:19
(dev-master)
License
Downloads
35
Tags
laravel-support
This library contains common funtionality that I use across many Laravel applications. I think some of this stuff belongs in the framework, but what do I know?
Installation is simple:
composer require bram1028/laravel-support
The service provider will be loaded automatically.
@optional
Checks if a section has content, so you can wrap a yield in other code.
@optional('hero')
<div class="hero">
<div class="hero-body">
{!! $yield !!}
</div>
</div>
@endoptional
Route::if()
Makes styling active nav links much cleaner.
<ul>
<li class="{!! Route::if('about', 'is-active') !!}">
<a href="{{ route('about') }}">About Us</a>
</li>
</ul>
And yes, you can pass multiple route names. The last parameter is used as the output value.
artisan job:list
Lists all jobs under App\Jobs.
artisan job:run
Runs a job under App\Jobs.
Currently only supports jobs without constructor parameters.