@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();
<?php | |
// at some point I wanted to insert stuff before/after specific item in a collection, and this was made. | |
// use it at your own risk. | |
Collection::macro('insertBefore', function ($target, $value, $new_key = null) { | |
if (is_int($target)) { | |
$this->items = array_merge(array_slice($this->items, 0, $target), [$value], array_slice($this->items, $target)); | |
return; | |
} |
@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();
I hereby claim:
To claim this, I am signing this object:
<select> | |
<option value="Arts">Arts</option> | |
<option value="Design "> Design </option> | |
<option value="Fashion & Beauty "> Fashion & Beauty </option> | |
<option value="Food "> Food </option> | |
<option value="Literature "> Literature </option> | |
<option value="Performing Arts "> Performing Arts </option> | |
<option value="Visual Arts "> Visual Arts </option> | |
<option value="Business">Business</option> | |
<option value="Business News "> Business News </option> |
/* | |
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() { | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<0> | |
<category>33</category> | |
<genre /> | |
<subgenre /> | |
<name>Movies</name> | |
</0> | |
<1> | |
<category>33</category> | |
<genre>4401</genre> |
--- | |
- | |
category: 33 | |
genre: null | |
subgenre: null | |
name: "Movies" | |
- | |
category: 33 | |
genre: 4401 | |
subgenre: null |
[ | |
{ | |
"category": 33, | |
"genre": null, | |
"subgenre": null, | |
"name": "Movies" | |
}, | |
{ | |
"category": 33, | |
"genre": 4401, |
category | genre | subgenre | name | |
---|---|---|---|---|
33 | Movies | |||
33 | 4401 | Action & Adventure | ||
33 | 4434 | African | ||
33 | 4402 | Anime | ||
33 | 4431 | Bollywood | ||
33 | 4403 | Classics | ||
33 | 4404 | Comedy | ||
33 | 4422 | Concert Films | ||
33 | 4405 | Documentary |