Laravel 5.0 Documentation
and even reject, requests before they enter your application. For more information on middleware, check out the documentation. In addition to the existing constructor injection, you may now type-hint dependencies and creation. You may now define events as objects instead of simply using strings. For example, check out the following event: class PodcastWasPurchased { public $podcast; public function __construct(Podcast handle(PodcastWasPurchased $event) { // } } For more information on working with events, check out the full documentation. In addition to the queue job format supported in Laravel 4, Laravel 50 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 3.2 Documentationto add a line to their php.ini file before the Fileinfo module is enabled. For more information check out the installation / configuration details on PHP.net. Laravel uses the Mcrypt library for pre-installed. If you can't find Mcrypt in the output of phpinfo() then check the vendor site of your LAMP installation or check out the installation / configuration details on PHP.net. Installation the named route: return Redirect::to_route('home'); Once you have named a route, you may easily check if the route handling the current request has a given name. Determine if the route handling the0 码力 | 139 页 | 1.13 MB | 1 年前3
Learning Laravelwhere() 30 Nesting 30 Additions 31 Using Get to lookup value or return default 31 Using Contains to check if a collection satisfies certain condition 32 Using Pluck to extract certain values from a collection Error in AJAX 179 Introduction 179 Examples 179 Setup Token on Header 179 Set token on tag 179 Check session storage path & permission 179 Use _token field on Ajax 180 Chapter 62: use fields aliases These two can be used to determine if a user has authorisation or not on a model respectively. To check if a user can view a content or not, you can do the following: if($user->can('view', $content)){0 码力 | 216 页 | 1.58 MB | 1 年前3
The Laravel Handbook
actions, like adding data to the database, or updating it. If you’re unsure what is a POST request, check my HTTP tutorial. We will start by adding a create method to the controller to handle the data those 2 methods to the class, create and delete , as we did before, but this time both first check that the user is logged in: 70 check()) { $this->validate($request, [ 'name' => 'required',0 码力 | 111 页 | 14.25 MB | 1 年前3
Laravel 5.3 中文文档'check-status' => 'Check order status', ]); 此外,Passport 还包含了用于验证访问令牌认证请求包含必要令牌域的中间件: Route::get('/orders/{order}/status', function (Order $order) { // Access token has "check-status" "check-status" scope... })->middleware('scope:check-status'); 最后,Passport 还支持从 JavaScript 应用访问你的 API,而不必担心访问令牌传输,Passport 通 过加密 JWT cookies 和同步 CSRF 令牌来实现这一功能,从而让开发者专注于业务开发。 本文档由 Laravel 学院(LaravelAcademy.org)提供 @else I don't have any records! @endif 为方便起见,Blade 还提供了 @unless 指令: @unless (Auth::check()) You are not signed in. @endunless 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档POST。因此,你需要更新前端发送请求到该路由的请求类型。例 如,如果你是用的是内置的邮箱验证模板代码,需要像这样调整请求 方法: {{ __('Before proceeding, please check your email for a verification link.') }} {{ __('If you did not receive the email') }},0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.6 中文文档box,通过这种方式下载的话需要手动将其添加到 Vagrant: vagrant box add laravel/homestead ~/Downloads/virtualbox.box 运行上述命令有可能报错: Check your Homestead.yaml file, the path to your private key does not exist. 解决办法如下: ssh-keygen -t rsa @else I don't have any records! @endif 为方便起见,Blade 还提供了 @unless 指令,表示除非: @unless (Auth::check()) You are not signed in. @endunless 此外,Blade 还提供了 @isset 和 @empty 指令,分别对应 PHP 的 isset 和 empty 要判断某个用户是否登录到应用,可以使用 Auth 门面的 check 方法,如果用户通过认证则返回 true: use Illuminate\Support\Facades\Auth; if (Auth::check()) { // The user is logged in... } 注:尽管我们可以使用 check 方法判断用户是否通过认证,但是我们通常的做法是在用户访0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档testNewUserRegistration(){ $this->visit('/register') ->type('Taylor', 'name') ->check('terms') ->press('Register') ->seePageIs('/dashboard'); } 更多有关测试的内容,请查看测试一节。 records! @else I don't have any records! @endif 为方便起见,Blade 还提供了@unless 指令: @unless (Auth::check()) You are not signed in. @endunless 4.2 循环 除了条件语句,Blade 还提供了简单指令处理 PHP 支持的循环结构,同样,这些指令函数 返回认证用户实例... } } } 2.4.1 判断当前用户是否通过认证 要判断某个用户是否登录到应用,可以使用 Auth 门面的 check 方法,如果用户通过认证则 返回 true: if (Auth::check()) { // The user is logged in... } 此外,你还可以在用户访问特定路由/控制器之前使用中间件来验证用户是否通过认证,想0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档@else I don't have any records! @endif 为方便起见,Blade 还提供了 @unless 指令: @unless (Auth::check()) You are not signed in. @endunless 循环 除了条件语句,Blade 还提供了简单指令处理 PHP 支持的循环结构,同样,这些指令函 数和 返回认证用户实例... } } } 判断当前用户是否通过认证 要判断某个用户是否登录到应用,可以使用 Auth 门面的 check 方法,如果用户通过认证则 返回 true: if (Auth::check()) { // The user is logged in... } 本文档由 Laravel 学院(LaravelAcademy.org)提供 $arguments) { // }); 3、检查权限(Abilities) 通过 Gate 门面 权限定义好之后,可以使用多种方式来“检查”。首先,可以使用 Gate 门面 的 check, allows, 或者 denies 方法。所有这些方法都接收权限名和传递给该权限回调的 参数作为参数。你不需要传递当前用户到这些方法,因为 Gate 会自动附加当前用户到传递 给回调的参数,因此,当检查我们之前定义的0 码力 | 377 页 | 4.56 MB | 1 年前3
《Slides Dev Web》 06. HTTP & AJAX
true); MyXhr.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); MyXhr.setRequestHeader("Pragma", "no-cache"); MyXhr.setRequestHeader("Expires", "Wed0 码力 | 11 页 | 91.09 KB | 1 年前3
共 10 条
- 1













