php Laravel:HasDatatable Trait用法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Laravel:HasDatatable Trait用法相关的知识,希望对你有一定的参考价值。
<?php
namespace App\Models;
use App\Traits\HasDatatable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable implements HasMediaConversions
{
use Notifiable, HasDatatable;
/**
* Guarded Field.
*
* @var array
*/
protected $guarded = ['id'];
/**
* Create Slug From.
*
* @var array
*/
protected $slug_from = ['name'];
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['deleted_at'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that show in datatable.
*
* @var array
*/
protected $datatable = [
'name', 'email'
];
}
以上是关于php Laravel:HasDatatable Trait用法的主要内容,如果未能解决你的问题,请参考以下文章
php Laravel:HasDatatable Trait API端点
php [Laravel Logs] Como loguear cosas con laravel #laravel #php
Laravel 4.2 + Laravel Valet + PHP 7 = 需要 Mcrypt PHP 扩展
PHP笔记-laravel环境搭建(Laravel5.8.35版本)
《PHP框架Laravel学习》系列分享专栏
php [Laravel - 自定义错误消息] Laravel 5.4其他登录条件 - 添加自定义错误消息。 #All #Script #Laravel #Php