Laravel 5.6 中文文档namespace App\Broadcasting; use App\User; use App\Order; class OrderChannel { /** * Create a new channel instance. * * @return void */ public function __construct() return $user->id === $order->user_id; } } API 控制器生成 声明被 API 消费的资源控制器时,通常你会排除输出 HTML 模板的路由,例如 create 和 edit,要生成不包含这些方法的资源控制器,可以在使 用 Artisan 命令执行 make:controller 时使用 --api 开关: php artisan make:controller Composer Create-Project 你还可以在终端中通过 Composer 的 create-project 命令来安装 Laravel 应用: composer create-project --prefer-dist laravel/laravel blog 如果要下载安装 Laravel 其他版本应用,比如 5.5 版本,可以使用这个命令: composer create-project0 码力 | 377 页 | 14.56 MB | 1 年前3
 Laravel 6.0 中文文档allow 和 deny 方法, 则可以忽略此更新: /** 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 14 * Create a new response. * * @param bool $allowed * @param string $message * @param mixed $code * @return Laravel 6.0 框架的新应用: composer global update 通过 Composer Create-Project 你还可以在终端中通过 Composer 的 create-project 命令来安 装 Laravel 应用: composer create-project --prefer-dist laravel/laravel blog 如果要下载安装 Laravel Laravel 其他版本应用,比如 5.8 版本,可以使用 这个命令: composer create-project --prefer-dist laravel/laravel blog 5.8.*。 安装完成后,可以通过如下命令查看 Laravel 的版本: php artisan -V 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun0 码力 | 1442 页 | 14.66 MB | 1 年前3
 Learning LaravelActions Handled By Resource Controller 44 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 3 102 Remarks 102 Examples 102 Installing Laravel 102 Via Laravel Installer 102 Via Composer Create-Project 103 Setup 103 Server Requirements 103 Local Development Server 104 Hello World Example Examples 157 Inserting data 157 Using the DB Facade 157 Via Instantiating a Model 157 Using the create method 157 Using factory 158 Seeding && deleting old data and reseting auto-increment 158 Calling0 码力 | 216 页 | 1.58 MB | 1 年前3
 The Laravel Handbook
Getting started 3. Blade 4. Dynamic routes 5. Adding a database 6. How to use migrations to create and modify the database schema 7. Using forms to accept user input and store it into the database a dev folder in my home directory, for example. In there, run: composer create-project laravel/laravel first To create a new project in a folder called first . Now go into that folder and run do a lot of useful stuff for you. For example we’ll use it to “scaffold” models without having to create files by hand. Open your browser and you’ll see the default welcome screen of a Laravel app: 70 码力 | 111 页 | 14.25 MB | 1 年前3
 Laravel 5.0 Documentation
application, such as error handling, logging, route loading, and more. Of course, you are free to create additional service providers for your application. Application language files and views have been SelfHandling, ShouldBeQueued { use SerializesModels; protected $user, $podcast; /** * Create a new command instance. * * @return void Authentication Scaffolding Event Objects Commands improvements over PHP 5.3. Laravel Forge, a new web based application, provides a simple way to create and manage PHP servers on the cloud of your choice, including Linode, DigitalOcean, Rackspace, and0 码力 | 242 页 | 1.44 MB | 1 年前3
 Laravel 3.2 Documentationclassy framework for PHP web development. Freeing you from spaghetti code, Laravel helps you create wonderful applications using simple, expressive syntax. Development should be a creative experience developer the flexibility that they need to create everything from very small sites to massive enterprise applications.  Reverse Routing allows you to create links to named routes. When creating links other frameworks. However due to Laravel's unique architecture, it is possible for developers to create their own infrastructure that is specifically designed for their application. This may be most0 码力 | 139 页 | 1.13 MB | 1 年前3
 Laravel 5.3 中文文档实例,最常见的场景就是授权 create 动 作。例如,如果你在创建一篇博客,你可能希望检查当前用户是否被授权创建文章。 当定义一个不接收模型实例的策略方法时,比如 create 方法,对应类名就不再需要以第二个参 数的方式传入,只需要传入认证用户实例即可: /** * Determine if the given user can create posts. * * @param \App\User $user * @return bool */ public function create(User $user) { // } AuthorizesResources Trait 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel Composer Create-Project 你还可以在终端中通过 Composer 的 create-project 命令来安装 Laravel 应用: composer create-project --prefer-dist laravel/laravel blog 注:如果要下载其他版本,比如5.2 版本,可以使用这个命令:composer create-project --prefer-0 码力 | 691 页 | 9.37 MB | 1 年前3
 Laravel 5.2 中文文档赖。该安装方法比通过 Composer 安装要快很多: laravel new blog 通过 Composer Create-Project 你还可以在终端中通过 Composer 的 create-project 命令来安装 Laravel 应用: composer create-project laravel/laravel --prefer-dist blog 3、基本配置 Laravel 制器也已经为这些动作设置了对应的处理方法。 资源控制器处理的动作 方法 路径 动作 路由名称 GET /photo index photo.index GET /photo/create create photo.create POST /photo store photo.store GET /photo/{photo} show photo.show GET /photo/{photo}/edit => ['create', 'store', 'update', 'destroy']]); 命名资源路由 默认情况下,所有资源控制器动作都有一个路由名称,然而,我们可以通过传入 names 数 组来覆盖这些默认的名字: Route::resource('photo', 'PhotoController', ['names' => ['create' =>0 码力 | 377 页 | 4.56 MB | 1 年前3
 Laravel 5.1 中文文档学院(LaravelAcademy.org)提供 5 然后,Laravel 5.0 中使用的 App\Services\Registrar 不再被需要,你可以直接简单拷贝粘 贴其中的 validator 方法和 create 方法到 AuthController 中,这两个方法中的代码不需要 做任何改动。不要忘记确认 Validator 和 User 在 AuthController 中是否已经被导入。 PasswordController Illuminate\Contracts\Validation\Validator。 Eloquent create 方法 Eloquent 的 create 方法现在可以不传入任何参数进行调用,如果你在模型中要重写 create 方法,将$attributes 参数的默认值改为数组: public static function create(array $attributes = []){ // Your 你还可以在终端中通过 Composer 的 create-project 目录来安装 Laravel: composer create-project laravel/laravel --prefer-dist 该命令会在当前目录中创建一个名为 laravel 的 Laravel 安装,如果想要指定安装目录名, 可通过如下命令: composer create-project laravel/laravel0 码力 | 307 页 | 3.46 MB | 1 年前3
 《Slides Dev Web》 09. Services Web
des URI (noms) – Actions déterminées par des méthodes HTTP (verbes) ∗ GET : READ (sûre) ∗ POST : CREATE ∗ PUT, PATCH : UPDATE (idempotente) ∗ DELETE : DELETE (idempotente) – Les liens hypertextes permettent (ressource) Description Index GET /blogs Affiche la liste New GET /blog/new Affiche formulaire création C Create POST /blogs Création en DB, puis redirection R Show GET /blogs/42 Affiche le blog 42 Edit GET /blogs/42/edit0 码力 | 6 页 | 47.90 KB | 1 年前3
共 12 条
- 1
 - 2
 













