big-pang / laravel-admin Goto Github PK
View Code? Open in Web Editor NEW基于laravel 5.3 与 自带的gate来做权限认证,前后端用户分表分别登录
License: MIT License
基于laravel 5.3 与 自带的gate来做权限认证,前后端用户分表分别登录
License: MIT License
use App\User;
This Line, should be changed into "App\Models\User;" ?
路由下面带log-viewer如何带上权限控制?
PermissionController 的80行,
userActionEvent 的21行.
对参数的类型声明需要满足版本在7以上..
可不可以删除?我注释了发现没事,不知道会不会有影响
按照步骤安装之后访问页面报 500 错误,
查看php-fpm日志,以下为错误信息:
[25-Feb-2017 17:01:43 PRC] PHP Fatal error: Trait 'Illuminate\Auth\CreatesUserProviders' not found in /data/www/com/bootstrap/cache/compiled.php on line 363
[25-Feb-2017 17:02:03 PRC] PHP Fatal error: Trait 'Illuminate\Auth\CreatesUserProviders' not found in /data/www/com/bootstrap/cache/compiled.php on line 363
[25-Feb-2017 17:02:41 PRC] PHP Fatal error: Trait 'Illuminate\Auth\CreatesUserProviders' not found in /data/www/com/bootstrap/cache/compiled.php on line 363
[25-Feb-2017 17:03:06 PRC] PHP Fatal error: Trait 'Illuminate\Auth\CreatesUserProviders' not found in /data/www/com/bootstrap/cache/compiled.php on line 363
[25-Feb-2017 17:03:51 PRC] PHP Fatal error: Trait 'Illuminate\Auth\CreatesUserProviders' not found in /data/www/com/bootstrap/cache/compiled.php on line 363
不需要你这样写,只需要
Route::group(['prefix'=>'/admin', 'as' => 'admin.', 'namespace' => 'Admin', 'middleware' => ['menu']], function () {
安装之后migrate之前由于AuthServiceProvider的boot方法读取数据库,而此时还没有migrate,所以也就不能正确运行任何artisan命令
报错。 后面的人注意: PHP版本必须7以上。 对版本要求目前有点高,大部分生产环境都不是7.0.
ErrorException in userActionEvent.php line 21:
Argument 1 passed to App\Events\userActionEvent::__construct() must be an instance of App\Events\string, string given, called in D:\phpStudy2\WWW\big\app\Http\Controllers\Admin\RoleController.php on line 162 and defined
添加、编辑、删除角色的时候报错ErrorException in RoleController.php line 102:
Trying to get property of non-object
但是数据是操作成功的。
event(new \App\Events\userActionEvent('\App\Models\Admin\Role',$role->id,1,"用户".Auth::user()->username."{".Auth::user()->id."}添加角色".$role->name."{".$role->id."}"));
这是对应的抱错行
不知道是否是要这样使用的:event(new userActionEvent('\App\Models\Admin\Role',$role->id,1,"用户".Auth::guard('admin')->user()->name."{".Auth::guard('admin')->user()->id."}添加角色".$role->name."{".$role->id."}"));
添加权限的时候, 在规则中, 如果输入了错误的路由, 后台会全部报错, 解决方法是 删掉数据库对应的权限记录, 然后 php artisan cache:clear
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.