Laravel 5.0 Documentation
Controllers vii. Route Caching iv. Requests i. Obtaining A Request Instance ii. Retrieving Input iii. Old Input iv. Cookies v. Files vi. Other Request Information v. Responses i. Basic Responses ii. Redirects iii. Practical Usage iv. Creating Facades v. Mocking Facades vi. Facade Class Reference v. Request Lifecycle i. Introduction ii. Lifecycle Overview iii. Focus On Service Providers vi. Application Subscription viii. Resuming A Subscription ix. Checking Subscription Status x. Handling Failed Payments xi. Handling Other Stripe Webhooks xii. Invoices iii. Cache i. Configuration ii. Cache Usage0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning LaravelFeatures 2 MVC 2 Blade Templating Engine 3 Routing & Middleware 3 Artisan 3 Eloquent ORM 3 Event Handling 3 Versions 3 Examples 4 Welcome to Laravel tag documentation! 4 Starter Guide 4 Getting Started Chapter 12: Cron basics 45 Introduction 45 Examples 45 Create Cron Job 45 Chapter 13: Cross Domain Request 46 Examples 46 Introduction 46 CorsHeaders 46 Chapter 14: Custom Helper function 48 Introduction Model File Location 88 Model configuration 89 Update an existing model 90 Chapter 25: Error Handling 91 Remarks 91 Examples 91 Send Error report email 91 Catching application wide ModelNotFoundException0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 3.2 Documentation.................................................................................... 49 Other Request Helpers ........................................................................................ ....................................................................... 125 Submitting a Pull Request .......................................................................................... 125 ....................................................................... 128 Submitting a Pull Request .......................................................................................... 1280 码力 | 139 页 | 1.13 MB | 1 年前3
The Laravel Handbook
made a request to the / relative URL ( http://127.0.0.1:8000/ ), which means the “home page”. This URL is handled in the routes/web.php file, which contains the router dedicated to handling HTTP requests 6. How to use migrations to create and modify the database schema Migrations are excellent for handling changes to the database, so you can apply them, and roll back in case you need to restore to a controller takes an action and determines what to do. For example we’ll create a form that sends a POST request to the /dogs route. The router will say “this controller is in charge” and will tell us which0 码力 | 111 页 | 14.25 MB | 1 年前3
Laravel 5.2 中文文档Laravel 5.2 可轻松实现表单字段的数组输入验证。例如,要验证给定数组输入字段中 的每一个 email 是唯一的,可以这么实现: $validator = Validator::make($request->all(), [ 'person.*.email' => 'email|unique:users' ]); 同样,你可以在语言文件中使用 * 来指定验证数组字段: 'custom' \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if ($request->input('age') <= 200) redirect('home'); } return $next($request); } } 正如你所看到的,如果 age<=200,中间件会返回一个 HTTP 重定向到客户端;否则,请 求会被传递下去。将请求往下传递可以通过调用回调函数 $next 并传入 $request。 理解中间件的最好方式就是将中间件看做 HTTP 请求到达目标动作之前必须经过的“层”,0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.6 中文文档新 $headers 属性: use Illuminate\Http\Request; /** * The headers that should be used to detect proxies. * * @var string */ protected $headers = Request::HEADER_X_FORWARDED_ALL; 更多关于 $headers $headers 变量值的信息可以查看完整的信任代理文档。 验证 ValidatesWhenResolved 接口 为了避免和 $request->validate() 方法冲突,ValidatesWhenResolved 接口/trait 的 validate 方法被重命名为 validateResolved。 杂项 本文档由 Laravel 学院提供 Laravel 学院致力于提供优质 文件不起作用,试试将其中内容做如下替换: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] Nginx 如果你使用的是 Nginx,使用如下站点配置指令就可以支持0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档* @param \Illuminate\Http\Request $request * @param \Closure $next * @param string $role * @return mixed */ public function handle($request, Closure $next, $role) { if (! $request->user()->hasRole($role)) { // 跳转... } return $next($request); } } 中间件参数可以再定义路由时通过:分隔中间件名称和参数名称来指定,多个参数可以通过 逗号进行分隔: 本文档由 Laravel 缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 GitHub 的 pull requests,而不是 仅仅报告缺陷,“缺陷报告”也可以通过一个包含失败测试的 pull request 的方式提交。 然而,如果你以文件的方式提交缺陷报告,你的问题应该包含一个标题和对该问题的明确说 明,还要包含尽可能多的相关信息以及论证该问题的代码样板,缺陷报告的目的是为了让你 自己和其他人更方便的重现缺陷并对其进行修复。0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.3 中文文档the avatar for the user. * * @param Request $request * @return Response */ public function update(Request $request) { $path = $request->file('avatar')->store('avatars', 's3'); tion ($request, $next) { $this->projects = Auth::user()->projects; return $next($request); }); } } 当然,你可以在控制器的其他方法中依靠 Illuminate\Http\Request 类获取到 session * 获取当前用户的所有 Projects. * * @param \Illuminate\Http\Request $request * @return Response */ public function index(Request $request) 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档@csrf . 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 19 来生成这个迁移: php artisan queue:failed-table 请求 Input 门面 影响级别:中等 Input 门面是 Request 门面的翻版,已经被移除,如果你在使 用 Input::get 方法,需要将其调整为 Request::input 方法。所有 其他调用 Input 门面的地方都需要做类似调整。 任务调度 本文档由学院君提供 学院君致力于提供优质 Laravel RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authori zation}] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] Nginx 如果你使用的是 Nginx,使用如下站点配置指令就可以支持0 码力 | 1442 页 | 14.66 MB | 1 年前3
使⽤Laravel 8
PHP主流框架打造
RESTful API前後端分離 WEB API RESTful API 是什麼 Representational state transfer (REST) 表現層狀態轉換 Client Server REQUEST RESPONSE GET https://localhost/api/v1/articles/1 HTTP STATUS : 200 OK HTTP 協定 HTTP VERBS. 14:07:22" } } 201 CREATED https://localhost/api/v1/articles Headers Headers Body Body REQUEST RESPONSE JSON Accept : application/json Content-Type : application/json Content-Type : application/json 14:07:22" } } 201 CREATED Request Response { "title": "我是標題⽂字", "content": "我是內容" } 查看單⼀資源 GET https://localhost/api/v1/articles/1 Response Request { "data": { "id":0 码力 | 22 页 | 3.41 MB | 1 年前3
共 14 条
- 1
- 2













