This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Coverage Badge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Toggle Field for Backpack for Laravel --> | |
{{-- | |
Author: Adoptavia | |
Website: https://github.com/adoptavia | |
Addon: https://github.com/digitallyhappy/toggle-field-for-backpack | |
--}} | |
@include('crud::fields.inc.wrapper_start') | |
@include('crud::fields.inc.translatable_icon') | |
<div class="checkbox"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD; | |
class PostCrudController extends CrudController | |
{ | |
use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation { store as traitStore; } //IMPORTANT HERE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD; | |
class ArticleCrudController extends CrudController | |
{ | |
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD; | |
class UserCrudController extends CrudController | |
{ | |
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD; | |
class UserCrudController extends CrudController | |
{ | |
use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Backpack\CRUD\app\Http\Controllers\CrudController; | |
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD; | |
class PostCrudController extends CrudController | |
{ | |
use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation { store as traitStore; } //IMPORTANT HERE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- checklist --> | |
@php | |
$model = new $field['model']; | |
$key_attribute = $model->getKeyName(); | |
$identifiable_attribute = $field['attribute']; | |
// calculate the checklist options | |
if (!isset($field['options'])) { | |
$field['options'] = $field['model']::all()->pluck($identifiable_attribute, $key_attribute)->toArray(); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- select2 multiple --> | |
@php | |
if (!isset($field['options'])) { | |
$options = $field['model']::all(); | |
} else { | |
$options = call_user_func($field['options'], $field['model']::query()); | |
} | |
$multiple = isset($field['multiple']) && $field['multiple']===false ? '': 'multiple'; | |
@endphp |