"chrisjean/php-ico": "^1.0",
"swayok/alternative-laravel-cache": "^5.4",
"genealabs/laravel-model-caching": "^0.8.0",
- "backpack/revise-operation": "^1.0"
+ "backpack/revise-operation": "^1.0",
+ "digitallyhappy/toggle-field-for-backpack": "^2.0",
+ "calebporzio/parental": "^0.10.0"
},
"require-dev": {
"filp/whoops": "^2.7",
class Checkbox extends Field
{
- protected $_adminType = 'checkbox';
+ protected $_adminType = 'toggle';
protected $_databaseType = 'boolean';
protected $_columnType = 'check';
protected $_cast = 'boolean';
+ protected $_viewNamespace = 'toggle-field-for-backpack::fields';
}
namespace Cubist\Backpack\app\Magic\Models;
+use Backpack\CRUD\app\Models\Traits\InheritsRelationsFromParentModel;
use Backpack\CRUD\app\Notifications\ResetPasswordNotification;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\MustVerifyEmail;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Notifications\Notifiable;
+use Parental\HasParent;
use Spatie\Permission\Traits\HasRoles;
class CubistMagicAuthenticatable extends CubistMagicAbstractModel
AuthorizableContract,
CanResetPasswordContract
{
+ use HasParent;
use Authenticatable, Authorizable, CanResetPassword, MustVerifyEmail;
use Notifiable;
use HasRoles;
'type' => 'checkbox',
'tab' => 'Login']);
-// $this->addField(['name' => 'permissions',
-// 'label' => '',
-// 'type' => 'RolesPermissions',
-// 'tab' => 'Roles & Permissions']);
+ $this->addField(['name' => 'permissions',
+ 'label' => '',
+ 'type' => 'RolesPermissions',
+ 'tab' => 'Roles & Permissions']);
$this->addField(['name' => 'remember_token',
'type' => 'Text',