Learning LaravelPagination 140 Examples 140 Pagination in Laravel 140 Changing pagination views 141 Chapter 46: Permissions for storage 142 Introduction 142 Examples 142 Example 142 Chapter 47: Policies 143 Examples anywhere by anyone, the rest of the app code is invisible or inaccessible to anyone without proper permissions. After developing the application on your development machine, it needs to be pushed to a production Such shared hosting packages, however do have limitations in terms of terminal access and file permissions. By default one has to upload their app/code to the public_html folder on their shared hosting0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.0 Documentation
debug configuration option set to true for a production application. Laravel may require some permissions to be configured: folders within storage require write access by the web server. The framework $query_string; } Of course, when using Homestead, pretty URLs will be configured automatically. Permissions Pretty URLs Apache Nginx Introduction After Installation Accessing Configuration Values configuration option set to true for a production application. Laravel may require one set of permissions to be configured: folders within storage require write access by the web server. You may easily0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 6.0 中文文档$next * @param string $role * @return mixed * translator https://xueyuanjun.com */ public function handle($request, Closure $next, $r ole) { if (! $request->user()->hasRole($role)) { // Redirect.. : 分隔中间件名和参数名来指定, 多个中间件参数可以通过逗号分隔: Route::put('post/{id}', function ($id) { // })->middleware('role:editor'); 根据上面的演示示例,这个功能实现起来也比较简单,就不再单独演 示了。 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun t->all(), [ 'role_id' => Rule::requiredIf($request->user()->is _admin), 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 354 ]); Validator::make($request->all(), [ 'role_id' => Rule::requiredIf(function0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 3.2 Documentationconcatenated with an underscore. For example, if the relationship is between User and Role, the intermediate table name should be role_user. Remove Eloquent bundle. If you are using the Eloquent bundle with function() { // })); Passing parameters to filters: Route::get('panel', array('before' => 'role:admin', function() { // })); Pattern Filters Sometimes you may want to attach a filter User has many Roles, but a Role can also belong to many Users. Three database tables must be created to accomplish this relationship: a users table, a roles table, and a role_user table. The structure0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.6 中文文档string $role * @return mixed * translator http://laravelacademy.org */ public function handle($request, Closure $next, $role) { if (! $request->user()->hasRole($role)) { 分隔中间件名和参数名来指定,多个中间件参数可以通过逗号分隔: Route::put('post/{id}', function ($id) { // })->middleware('role:editor'); 根据上面的演示示例,这个功能实现起来也比较简单,就不再单独演示了。 终端中间件 终端中间件,可以理解为一个善后的后台处理中间件。有时候中间件可能需要在 HTTP 方法实现: $role = $request->input('role'); $users = DB::table('users') ->when($role, function ($query) use ($role) { return $query->where('role_id', $role);0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档* @param string $role * @return mixed */ public function handle($request, Closure $next, $role) { if (! $request->user()->hasRole($role)) { // 跳转... 逗号进行分隔: 本文档由 Laravel 学院(LaravelAcademy.org)提供 3 Route::put('post/{id}', ['middleware' => 'role:editor', functio n ($id) { // }]); 更多关于中间件的内容,请查看中间件一节。 测试革新 Laravel 中内置的测试功能获得了引入注目的 string $role * @return mixed * translator http://laravelacademy.org */ public function handle($request, Closure $next, $role) { if (! $request->user()->hasRole($role)) {0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.3 中文文档$next * @param string $role * @return mixed * translator http://laravelacademy.org */ public function handle($request, Closure $next, $role) { if (! $re $request->user()->hasRole($role)) { // Redirect... } return $next($request); } } 中间件参数可以在定义路由时通过:分隔中间件名和参数名来指定,多个中间件参数可以通过逗 号分隔: 本文档由 Laravel 学院(LaravelAcademy 学院致力于提供优质 Laravel 中文学习资源 118 Route::put('post/{id}', function ($id) { // })->middleware('role:editor'); 5、可终止的中间件 有时候中间件可能需要在 HTTP 响应发送到浏览器之后做一些工作。比如,Laravel 内置的 “session”中间件会在响应发送到浏览器之后将0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.2 中文文档$next * @param string $role * @return mixed * translator http://laravelacademy.org */ public function handle($request, Closure $next, $role) { if (! $re $request->user()->hasRole($role)) { // Redirect... } return $next($request); } } 中间件参数可以在定义路由时通过:分隔中间件名和参数名来指定,多个中间件参数可以 通过逗号分隔: Route::put('post/{id}' , ['middleware' => 'role:editor', function ($id) { // }]); 5、可终止的中间件 有时候中间件可能需要在 HTTP 响应发送到浏览器之后做一些工作。比如,Laravel 内置 的“session”中间件会在响应发送到浏览器之后将 Session 数据写到存储器中,为了实现 这个,定义一个可终止的中间件并添加 terminate0 码力 | 377 页 | 4.56 MB | 1 年前3
《Slides Dev Web》02. Introduction aux frameworks PHP
BDD • Tests • Génération, validation et traitement de formulaires • Authenfication, Sessions, Permissions, Roles, ACL • Pagination • I18n • Génération de code • Mail • Connecteurs aux webservices 7https://12factor0 码力 | 24 页 | 1.03 MB | 1 年前3
共 9 条
- 1













