Laravel 3.2 Documentation......................................................................................... 20 Controller Routing ...................................................................................... ................................................................................. 22 iv Controller Routing ...................................................................................... ......................................................................................... 25 Controller Layouts ......................................................................................0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.0 Documentation
Terminable Middleware Table of Contents iii. Controllers i. Introduction ii. Basic Controllers iii. Controller Middleware iv. Implicit Controllers v. RESTful Resource Controllers vi. Dependency Injection Assertions vii. Helper Methods viii. Refreshing The Application xxii. Validation i. Basic Usage ii. Controller Validation iii. Form Request Validation iv. Working With Error Messages v. Error Messages & information on contracts, consult the full documentation. If your application is made up entirely of controller routes, you may utilize the new route:cache Artisan command to drastically speed up the registration0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning LaravelExamples 41 Basic Controllers 41 Controller Middleware 41 Resource Controller 42 Example of how a Resource Controller look 42 Actions Handled By Resource Controller 44 Chapter 12: Cron basics 45 Introduction the application 111 Using a different server 111 Requirements 112 Hello World Example (Using Controller and View) 113 Hello World Example (Basic) 114 Installation using LaraDock (Laravel Homestead Installation 116 Hello World Example (Basic) 117 Hello World Example With Views and Controller 117 The view 117 The controller 117 The router 118 Chapter 34: Introduction to laravel-5.2 119 Introduction0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.1 中文文档AuthController 中是否已经被导入。 PasswordController 不再需要在构造函数中声明任何依赖,可以移除 5.0 中要求的两个依 赖。 验证 如果你重写了 Controller 类中的 formatValidationErrors 方法,需要将类型提示由 Illuminate\Validation\Validator 改为 Illuminate\Contract App\Http\Controllers; use App\User; use App\Http\Controllers\Controller; 本文档由 Laravel 学院(LaravelAcademy.org)提供 30 class UserController extends Controller { /** * 为指定用户显示详情 * * @param 造函数中使用 middleware 方 法你可以很轻松的分配中间件给该控制器。你甚至可以限定该中间件到该控制器类的特定方 法: class UserController extends Controller { /** * 实例化一个新的 UserController 实例 * * @return void */ public0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档Illuminate\Contracts\Bus\SelfHandling 契约 集合的 lists 方法被重命名为 pluck 方法。 隐式控制器路由 Route::controller 被废弃。在路由文件中请使用明确的路由注 册。 Laravel 5.1 的 database Session 驱动被重命名为 legacy-database。 Str::randomBytes 常控制器存放在 app/Http/Controllers 目录中。 2、基本控制器 下面是一个基本控制器类的例子。所有的 Laravel 控制器应该继承自 Laravel 自带的控制 器基类 Controller: 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 37 Controller; class UserController extends Controller { /** * 为指定用户显示详情 * * @param int $id0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.3 中文文档AuthorizesResourcestrait 已 经 和 AuthorizesRequeststrait 合 并 到 一 起 , 你 需 要 从 app/Http/Controllers/Controller.php 中移除 AuthorizesResourcestrait。 Blade 自定义指令 在之前版本的 Laravel 中,我们使用 directive 方法注册自定义的 Blade App\User; use Illuminate\Support\Facades\Auth; use App\Http\Controllers\Controller; class ProjectController extends Controller { /** * 当前用户的的所有 Projects. */ 本文档由 Laravel 学院(LaravelAcademy App\Http\Controllers; use Log; use App\User; use App\Http\Controllers\Controller; class UserController extends Controller{ /** * 显示指定用户的属性 * * @param int $id * @return0 码力 | 691 页 | 9.37 MB | 1 年前3
The Laravel Handbook
create a controller named DogController : php artisan make:controller DogController 29 Laravel adds a DogController.php file into the folder app/Http/Controllers/ What is a controller? A controller request to the /dogs route. The router will say “this controller is in charge” and will tell us which method to use. Inside the controller we write methods that perform actions, like adding data method to the controller to handle the data coming from the form, so we can store that to the database. Before doing so, in routes/web.php we add the POST /dogs route handle controller and we assign0 码力 | 111 页 | 14.25 MB | 1 年前3
Laravel 5.6 中文文档消费的资源控制器时,通常你会排除输出 HTML 模板的路由,例如 create 和 edit,要生成不包含这些方法的资源控制器,可以在使 用 Artisan 命令执行 make:controller 时使用 --api 开关: php artisan make:controller API/PhotoController --api 模型序列化优化 在之前版本的 Laravel 中,队列中的模型在反序列化后不会带有完整的已加载关联关系。在 方法会返回前端控制器的完整路径,通常是 index.php: /** * Get the fully resolved path to the application's front controller. * * @param string $sitePath * @param string $siteName * @param string $uri * @return return true; } /** * Get the fully resolved path to the application's front controller. * * @param string $sitePath * @param string $siteName * @param string0 码力 | 377 页 | 14.56 MB | 1 年前3
《Slides Dev Web》02. Introduction aux frameworks PHP
contrôle (IoC4) • Model View Controller – M : Accès aux données, logique métier – V : Templates des pages à générer – C : Orchestration, transfert des infos • Front Controller – Traitement et dispatch • Nommage – Classes – Base de données – Fichiers et dossiers • ROUTES : http://app.host.tld/controller/action[/key/val] • Arborescence : – Imposée ou libre selon frameworks – Pas de code (minimum) m-crud/ 6http://ui-patterns.com/ 2 Figure 1: MVC 3 Bonnes pratiques • Heavy Model, Light Controller • Don’t Repeat Yourself • You Ain’t Gonna Need It • Convention Over Configuration • Keep It Simple0 码力 | 24 页 | 1.03 MB | 1 年前3
Laravel 6.0 中文文档方法会返回前端控制器的完整路径,通常 是 index.php: /** * Get the fully resolved path to the application's fr ont controller. * * @param string $sitePath * @param string $siteName * @param string $uri * @return string Laravel 中文学习资源:https://xueyuanjun.com 110 * Get the fully resolved path to the application's front controller. * * @param string $sitePath * @param string $siteName * @param string $uri * @return string App\User; use App\Repositories\UserRepository; use App\Http\Controllers\Controller; class UserController extends Controller { /** * The user repository implementation. * * @var UserRepository0 码力 | 1442 页 | 14.66 MB | 1 年前3
共 11 条
- 1
- 2













