Laravel 5.2 中文文档
消息接口,包括请求和响应。如果你想要获取 PSR-7 请求实 例,首先需要安装一些库,Laravel 使用 Symfony HTTP Message Bridge 组件将典型的 Laravel 请求和响应转化为 PSR-7 兼容的实现: composer require symfony/psr-http-message-bridge composer require zendframework/zend-diactoros ros 安装完这些库之后,你只需要在路由或控制器中通过对请求类型进行类型提示就可以获取 PSR-7 请求: use Psr\Http\Message\ServerRequestInterface; 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 47 Route::get('/' Post 模型,你可以从关联关系的 save 方法直接插入 Comment 而不是手动设置 Comment 的 post_id 属性: $comment = new App\Comment(['message' => 'A new comment.']); $post = App\Post::find(1); $post->comments()->save($comment); 注意我们没有用动态属性方式访问0 码力 | 377 页 | 4.56 MB | 1 年前3Laravel 5.6 中文文档
Artisan 命令 down 即可: php artisan down 还可以提供 message 和 retry 选项给 down 命令。message 的值用于显示或记录自定义消息,而 retry 的值用于设置 HTTP 请求头的 Retry- After: php artisan down --message="Upgrading Database" --retry=60 要关闭维护模式,开启站点,对应的 erManager auth.password Password(实例) Illuminate\Auth\Passwords\PasswordBroker auth.password.broker Queue Illuminate\Queue\QueueManager queue Queue(实例) Illuminate\Contracts\Queue\Queue queue Illuminate\Contracts\Auth\Guard Auth::guard() Illuminate\Contracts\Auth\PasswordBroker Password::broker() Illuminate\Contracts\Auth\PasswordBrokerFactory Password Illuminate\Contracts\Auth\StatefulGuard0 码力 | 377 页 | 14.56 MB | 1 年前3Laravel 6.0 中文文档
方法获取授权策略的响应,然 后再通过响应示例的 message() 方法获取授权消息: $response = Gate::inspect('view', $flight); if ($response->allowed()) { // 用户被授权可以访问航班... } if ($response->denied()) { echo $response->message(); } 此外,当在路由或控制器中使用 response. * * @param bool $allowed * @param string $message * @param mixed $code * @return void */ public function __construct($allowed, $message = '', $code = null) Illuminate\Contracts\Auth\Access\Gate 不再约束或验证密码。因为密码验证逻辑已经 由 ResetPasswordController 控制器处理,导致 broker 的验证逻 辑变得冗余,并且不能被自定义,如果你在内置 的 ResetPasswordController 之外使用了 PasswordBroker 或 者 Password 门面,需要在传递它们到 broker 之前先验证它们。 队列 本文档由学院君提供 学院君致力于提供优质 Laravel0 码力 | 1442 页 | 14.66 MB | 1 年前3Laravel 5.3 中文文档
WelcomeMessage extends Mailable { use Queueable, SerializesModels; /** * Build the message. * * @return $this */ public function build() 本文档由 Laravel 学院(LaravelAcademy 消息接口,包括请求和响应。如果你想要获取 PSR-7 请求实例,首先 需要安装一些库,Laravel 使用 Symfony HTTP Message Bridge 组件将典型的 Laravel 请求和响 应转化为 兼容 PSR-7 的实现: composer require symfony/psr-http-message-bridge composer require zendframework/zend-diactoros 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 138 use Psr\Http\Message\ServerRequestInterface; Route::get('/', function (ServerRequestInterface $request) { //0 码力 | 691 页 | 9.37 MB | 1 年前3Laravel 5.0 Documentation
instance and flash data to the session in a single method chain: return redirect('user/login')->with('message', 'Login Failed'); You may wish to redirect the user to their previous location, for example, after some message. Here's what that might look like: var gulp = require("gulp"); var shell = require("gulp-shell"); var elixir = require("laravel-elixir"); elixir.extend("message", function(message) { gulp.task("say", function() { gulp.src("").pipe(shell("say " + message)); }); return this.queueTask("say"); }); Notice that we extend Elixir's API by passing the key that0 码力 | 242 页 | 1.44 MB | 1 年前3Laravel 3.2 Documentation
action would accept the posted form, validate, and either redirect to the login form with an error message or redirect your user to their dashboard. Class Auto Loading keeps you from having to maintain links, current protocol is used. Fix bug in Eloquent auth driver. Added format method to message container. Upgrading From 3.2 Replace the laravel folder. Laravel 3.2 Added to_array or signs into your application, it is common to display a welcome or status message. But, how can you set the status message so it is available for the next request? Use the with() method to send flash0 码力 | 139 页 | 1.13 MB | 1 年前3Laravel 5.1 中文文档
消息接口,包括请求和响应。如果你想要获取 PSR-7 请求实例, 首先需要安装一些库,Laravel 使用 Symfony HTTP Message Bridge 组件将典型的 Laravel 请求和响应转化为 PSR-7 兼容的实现: composer require symfony/psr-http-message-bridge composer require zendframework/zend-diactoros s 安装完这些库之后,你只需要在路由或控制器中通过对请求类型进行类型提示就可以获取 PSR-7 请求: use Psr\Http\Message\ServerRequestInterface; Route::get('/', function (ServerRequestInterface $request) { // }); 如果从路由或控制器返回的是 PSR-7 响应实例,则其将会自动转化为 Post 模型,你可以从关联关系的 save 方法直接插入 Comment 而不是手动设置 Comment 的 post_id 属性: $comment = new App\Comment(['message' => 'A new comment.']); $post = App\Post::find(1); $comment = $post->comments()->save($comment);0 码力 | 307 页 | 3.46 MB | 1 年前3Learning Laravel
related to a post by doing the following: $post = Post::find(1); $commentToAdd = new Comment(['message' => 'This is a comment.']); https://riptutorial.com/ 76 $post->comments()->save($commentToAdd); $post->comments()->saveMany([ new Comment(['message' => 'This a new comment']), new Comment(['message' => 'Me too!']), new Comment(['message' => 'Eloquent is awesome!']) ]); Alternatively Eloquent model instance. $post = Post::find(1); $post->comments()->create([ 'message' => 'This is a new comment message' ]); Introduction Eloquent relationships are defined as functions on your Eloquent0 码力 | 216 页 | 1.58 MB | 1 年前3《Slides Dev Web》 06. HTTP & AJAX
entêtes HTTP25 – Champ Status – Code d’erreur • En PHP header("Status: Message d'erreur explicite", true, 400); • Afficher le message au client : myXHR.getResponseHeader("Status"); 22https://fetch.spec0 码力 | 11 页 | 91.09 KB | 1 年前3《Slides Dev Web》 09. Services Web
aspects des services web – pour déployer un WS : au minimum SOAP + WSDL + UDDI SOAP • Structure d’un message SOAP – Enveloppe, Entête, Corps, Erreurs 3https://upload.wikimedia.org/wikipedia/commons/3/3f/Concept_WS0 码力 | 6 页 | 47.90 KB | 1 年前3
共 11 条
- 1
- 2