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 年前3CakePHP Cookbook 2.x
FlashComponent::success() method to set a message to a session variable to be displayed on the page after redirection. In the layout we have FlashHelper::render() which displays the message and clears the corresponding deletes the post specified by $id, and uses $this->Flash->success() to show the user a confirmation message after redirecting them on to /posts. If the user attempts to do a delete using a GET request, we http://www.example.com/cake_2_0/. At this point, you’ll be presented with CakePHP’s default home, and a message that tells you the status of your current database connection. Congratulations! You are ready to0 码力 | 1096 页 | 958.62 KB | 1 年前3CakePHP Cookbook 2.x
FlashComponent::success() method to set a message to a session variable to be displayed on the page after redirection. In the layout we have FlashHelper::render() which displays the message and clears the corresponding deletes the post specified by $id, and uses $this->Flash->success() to show the user a confirmation message after redirecting them on to /posts. If the user attempts to do a delete using a GET request, we http://www.example.com/cake_2_0/. At this point, you’ll be presented with CakePHP’s default home, and a message that tells you the status of your current database connection. Congratulations! You are ready to0 码力 | 820 页 | 2.52 MB | 1 年前3Guzzle PHP v5 Documentation
called with a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success These then calls are either fulfilled with a successful Psr\Http\Message\ResponseInterface or rejected with an exception. use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Exception\RequestException; were delivered a response from a promise. The response object implements a PSR-7 response, Psr\Http\Message\ResponseInterface, and contains lots of helpful information. You can get the status code and reason0 码力 | 49 页 | 231.08 KB | 10 月前3Guzzle PHP 6.5 Documentation
called with a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success These then calls are either fulfilled with a successful Psr\Http\Message\ResponseInterface or rejected with an exception. use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Exception\RequestException; were delivered a response from a promise. The response object implements a PSR-7 response, Psr\Http\Message\ResponseInterface, and contains lots of helpful information. You can get the status code and reason0 码力 | 65 页 | 311.42 KB | 10 月前3Guzzle PHP 7.0 Documentation
called with a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success These then calls are either fulfilled with a successful Psr\Http\Message\ResponseInterface or rejected with an exception. use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Exception\RequestException; were delivered a response from a promise. The response object implements a PSR-7 response, Psr\Http\Message\ResponseInterface, and contains lots of helpful information. You can get the status code and reason0 码力 | 64 页 | 310.93 KB | 10 月前3Guzzle PHP 7.0 Documentation
called with a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success These then calls are either fulfilled with a successful Psr\Http\Message\ResponseInterface or rejected with an exception. use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Exception\RequestException; were delivered a response from a promise. The response object implements a PSR-7 response, Psr\Http\Message\ResponseInterface, and contains lots 8 Chapter 1. User Guide Guzzle, Release of helpful information0 码力 | 50 页 | 235.39 KB | 10 月前3
共 74 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8