Laravel 3.2 Documentationsite-wide. Restful Controllers are an optional way to separate your GET and POST request logic. In a login example your controller's get_login() action would serve up the form and your controller's post_login() resolution of unset Eloquent attributes. Allows pivot table timestamps to be disabled. Made the get_timestamp Eloquent method static. Request::secure now takes application.ssl configuration option iler', Add the following code above Blade::sharpen() in application/start.php .. if (Config::get('application.profiler')) { Profiler::attach(); } Upgrade the paths.php file. Replace0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.0 Documentation
If you liked Boris in Laravel 4, you're going to love Psysh. Even better, it works on Windows! To get started, just try: php artisan tinker Instead of a variety of confusing, nested environment configuration you've ever been intimidated by learning Grunt or Gulp, fear no more. Elixir makes it a cinch to get started using Gulp to compile your Less, Sass, and CoffeeScript. It can even run your tests for you Socialize::with('twitter')->user(); } No more spending hours writing OAuth authentication flows. Get started in minutes! The full documentation has all the details. Laravel now includes the powerful0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning Laravel30 Remarks 30 Examples 30 Creating Collections 30 where() 30 Nesting 30 Additions 31 Using Get to lookup value or return default 31 Using Contains to check if a collection satisfies certain condition controllers. Controllers are the main part where most of the work is done. They connect to models to get, create or update data and display the results on views, which contain the actual HTML structure of Control Structures Or Installation from here Get composer from here and install it 1. Get Wamp from here, install it and set environment variable of PHP 2. Get path to www and type command: 3. composer0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.6 中文文档cademy.org 2 Route::middleware('auth:api', 'throttle:60,1')->group(function () { Route::get('/user', function () { // }); }); 在 Laravel 5.6 中,你可以基于认证用户模型属性指定一个动态的最大请求次数,如果 User 中间件,以便用于计算最大请求次数计数: Route::middleware('auth:api', 'throttle:rate_limit,1')->group(function () { Route::get('/user', function () { // }); }); 广播频道类 如果你的应用消费多个不同的频道,routes/channels.php 文件可 的时候才会被调用。 frontControllerPath 方法 frontControllerPath 方法会返回前端控制器的完整路径,通常是 index.php: /** * Get the fully resolved path to the application's front controller. * * @param string $sitePath0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档创建完中间件后,可以通过在任务类的 middleware 方法中返回中间 件数组来将其追加到队列任务中: use App\Jobs\Middleware\RateLimited; /** * Get the middleware the job should pass through. * * @return array */ public function middleware() ->whereColumn('destination_id', 'destinations.id ') ->orderBy('arrived_at', 'desc') ->limit(1) ])->get(); 此外,我们还可以使用查询构建器方法 orderBy 添加的新的子查询 方法基于到达目的地的最晚航班到达时间对所有航班目的地进行排 序,同样,这也可以通过一次数据库查询完成: return ->whereColumn('destination_id', 'destinations. id') ->orderBy('arrived_at', 'desc') ->limit(1) )->get(); Laravel UI 之前版本 Laravel 提供的典型的前端脚手架代码现在被提取到独立 的 Composer 扩展包 laravel/ui 中,这样一来可以让 UI 脚手架代 码0 码力 | 1442 页 | 14.66 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" scope $order->save(); 模型被索引之后,就可以通过模型进行全文搜索了,甚至还可以对搜索结果进行分页: return Order::search('Star Trek')->get(); return Order::search('Star Trek')->where('user_id', 1)->paginate(); 当然,Scout 还有很多其他特性,具体请查看其文档。 路由取代之前的 GET 路由。这可以防止其它 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 16 应用让用户从应用中退出。想要升级的话,需要将原来的退出请求转化为 POST 请求方式,或者 为/logout URI 自定义 GET 路由: Route::get('/logout'0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 5.1 中文文档App\Providers\RouteServiceProvider 类载入的 app/Http/routes.php 文件中。 最基本的 Laravel 路由接收一个 URI 和一个闭包: Route::get('/', function () { return 'Hello World'; }); Route::post('foo/bar', function () { return // }); 为多个动作注册路由 有时候需要注册一个路由来响应多个不同的 HTTP 动作,你可以使用 Route 门面的 match 方法来实现: Route::match(['get', 'post'], '/', function () { return 'Hello World'; }); 或者,还可以使用 any 方法注册一个路由响应所有 HTTP 动作: 片段,比如,如果想要从 URL 中捕获用户 ID,可以通过如 下方式定义路由参数: Route::get('user/{id}', function ($id) { return 'User '.$id; }); 可以按需要定义在路由中定义多个路由参数: Route::get('posts/{post}/comments/{comment}', function ($postI0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 2 use App\User; Route::get('/user/{user}', function (User $user) { return $user; }); 在 Laravel 5.1 中,你需要通过 Route::model 一个新的访问频率限制中间件已经被内置到框架中,从而允许你轻松限制给定 IP 地址在 指定时间内对某个路由发起请求的数目。例如,要限制某个 IP 地址每分钟只能访问某个 路由 60 次,你可以这么做: Route::get('/api/users', ['middleware' => 'throttle:60,1', function () { // }]); 数组输入验证 在 Laravel App\Providers\RouteServiceProvider 类载入 的 app/Http/routes.php 文件中。 最基本的 Laravel 路由接收一个 URI 和一个闭包: Route::get('foo', function () { return 'Hello World'; }); 本文档由 Laravel 学院(LaravelAcademy.org)提供0 码力 | 377 页 | 4.56 MB | 1 年前3
The Laravel Handbook
follows the 80/20 rule: learn in 20% of the time the 80% of a topic. In particular, the goal is to get you up to speed quickly with Laravel. This book is written by Flavio. I publish programming tutorials Non-web routes 17. Creating commands 18. Where to go from here The goal of this handbook is to get you up and running with Laravel, starting from zero knowledge. I will only teach you the basics, requirements. 5 In this handbook I am going to give a introduction to Laravel to get you up and running. 2. Getting started To get started with Laravel, you need to set up your PHP environment on your computer0 码力 | 111 页 | 14.25 MB | 1 年前3
《Slides Dev Web》 06. HTTP & AJAX
HyperText Transfer Protocol • Protocole application : invention www en 1990 (v0.9) – Connexion, GET, réponse, fermeture • HTTP 1.0 (1996) – Entêtes de requête (Host, Referer, User-Agent, …) et réponse Succès • 3xx : Redirection • 4xx : Erreur Client • 5xx : Erreur Serveur Méthodes HTTP (verbes) • GET : Demander une ressource • POST : Création d’une ressource • PUT : Remplacement total d’une ressource réponse, sans la ressource • TRACE, OPTIONS, CONNECT idempotentes sûres Echanges HTTP • Requête GET / HTTP/1.1[CRLF] Host: www.cff.ch[CRLF] Connection: close[CRLF] User-Agent: Opera/9.20 (Windows NT0 码力 | 11 页 | 91.09 KB | 1 年前3
共 15 条
- 1
- 2













