@roles
Blade Directive For Laravel Spark
Assumes you're using teams
Add this to the boot()
method of your AppServiceProvider
\Blade::directive('role', function($role) {
$user = auth()->user();
/* | |
Exemples : | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}"> | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?"> | |
*/ | |
(function() { | |
@roles
Blade Directive For Laravel SparkAssumes you're using teams
Add this to the boot()
method of your AppServiceProvider
\Blade::directive('role', function($role) {
$user = auth()->user();