-
application key to a random string. If you installed Laravel via Composer, this key has probably already been set for you by the key:generate command. Typically, this string should be 32 characters long configuration will allow "pretty" URLs: location / { try_files $uri $uri/ /index.php?$query_string; } Of course, when using Homestead, pretty URLs will be configured automatically. Permissions Mode & Queues Pretty URLs Apache Nginx location / { try_files $uri $uri/ /index.php?$query_string; } Of course, when using Homestead, pretty URLs will be configured automatically. Introduction
0 码力 |
242 页 |
1.44 MB
| 1 年前 3
-
.............. 72 Encrypting A String ..................................................................................................... 72 Decrypting A String.................................. 3. Set the value of the key option in the config/application.php file to a random, 32 character string. 4. Verify that the storage/views directory is writable. 5. Navigate to your application in you are using mod_rewrite, set the index option in application/config/application.php to an empty string. Verify that your storage folder and the folders within are writable by your web server.
0 码力 |
139 页 |
1.13 MB
| 1 年前 3
-
for Pretty URLs 105 Chapter 30: Helpers 107 Introduction 107 Examples 107 Array methods 107 String methods 107 Path mehods 107 Urls 108 Chapter 31: HTML and Form Builder 109 Examples 109 Installation $table->increments('id'); $table->string('name'); $table->string('email')->unique(); $table->string('password'); $table->rememberToken(); stored in the resources/views directory. A view can be called using the view helper function: view(string $path, array $data = []) The first parameter of the helper is the path to a view file, and the second
0 码力 |
216 页 |
1.58 MB
| 1 年前 3
-
的数据库来索引,更简单,也更高效。两个方法都会返回 Ramsey\Uuid\Uuid 对象: use Illuminate\Support\Str; return (string) Str::uuid(); return (string) Str::orderedUuid(); Collision 默认的 laravel/laravel 应用现在为 Collision 包含了一个 dev Composer PHP 底层 htmlspecialchars 函数的默认行为保持一致。如果 你想要维持不进行双重编码的旧状,可以传递 false 作为第二个参数到 e 函数: string, false); ?> 日志 新配置文件 所有的日志配置现在都存放在独立的 config/logging.php 配置文件。你可以拷贝一份默认的配置文件到你的应用然后基于应用需要进行设置。 Illuminate\Http\Request; /** * The headers that should be used to detect proxies. * * @var string */ protected $headers = Request::HEADER_X_FORWARDED_ALL; 更多关于 $headers 变量值的信息可以查看完整的信任代理文档。
0 码力 |
377 页 |
14.56 MB
| 1 年前 3
-
Laravel 中文学习资源:https://xueyuanjun.com 14 * Create a new response. * * @param bool $allowed * @param string $message * @param mixed $code * @return void */ public function __construct($allowed, $message builder instance. * * @param \Closure|\Illuminate\Database\Query\Builde r|string $table * @param string|null $as * @param string|null $connection * @return \Illuminate\Database\Query\Builder 本文档由学院君提供 key ID. * 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 18 * @var string */ protected $keyType = 'string'; 邮箱验证 重新发送验证路由 HTTP 方法 影响级别:中等 为了免除潜在的 CSRF 攻击,使用 Laravel 内置邮箱验证功能通过 路由器注册的
0 码力 |
1442 页 |
14.66 MB
| 1 年前 3
-
当验证数组、布尔值、整型、数字、字符串时,null 不会被当作有效值,除非在约束条件中设置 包含 nullable: Validate::make($request->all(), [ 'string' => 'nullable|max:5', ]); 1.3 贡献代码 1、缺陷报告 为了鼓励促进更加有效积极的合作,Laravel 强烈鼓励使用 GitHub 的 pull requests,而不是仅仅 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 33 * @param string|array $abstract * @param \Closure|string|null $concrete * @param bool $shared * @return void */ public function * Determine if the driver serves the request. * * @param string $sitePath * @param string $siteName * @param string $uri * @return void * @translator laravelacademy.org */
0 码力 |
691 页 |
9.37 MB
| 1 年前 3
-
php 中指定 legacy-database 驱动。 如果你想要使用新的驱动,还需要添加 user_id (nullable integer)、ip_address (nullable string) 以及 user_agent (text) 列到存放 Session 的数据表中。 Stringy 框架不再内置 Stringy 库,如果要在应用中使用,你需要通过 Composer 手动安装。 with the container. * * @param string|array $abstract 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 11 * @param \Closure|string|null $concrete * @param bool $shared Eloquent 模型类 的 getRouteKeyName 方法: /** * Get the route key for the model. * * @return string */ public function getRouteKeyName() { return 'slug'; } 显式绑定 要注册显式绑定,需要使用路由的 model
0 码力 |
377 页 |
4.56 MB
| 1 年前 3
-
* @param \Illuminate\Http\Request $request * @param \Closure $next * @param string $role * @return mixed */ public function handle($request, Closure $next, $role) Artisan 命令可以通过使用一个简单的,类似路由风格的“签名”(提供了一个非常简单的接口 来定义命令行参数和选项)来定义: /** * 命令行的名称和签名. * * @var string */ 本文档由 Laravel 学院(LaravelAcademy.org)提供 4 protected $signature = 'email:send {user} {--force}'; / { 本文档由 Laravel 学院(LaravelAcademy.org)提供 11 try_files $uri $uri/ /index.php?$query_string; } 当然,使用 Homestead 的话,以上配置已经为你配置好以支持 URL 美化。 2.2 环境配置 基于应用运行环境拥有不同配置值能够给我们开发带来极大的方便,比如,我们想在本地和
0 码力 |
307 页 |
3.46 MB
| 1 年前 3
-
(cmd-s or ctrl-s) and reload in the browser, the homepage content will switch to displaying this string: 14 So now you know for sure that this file is responsible for what’s shown on that URL! Now name string and the timestamp utility columns ( created_at and updated_at , as we’ll see). 24 Schema::create('dogs', function (Blueprint $table) { $table->id(); $table->string('name'); the dog: Schema::create('dogs', function (Blueprint $table) { $table->id(); $table->string('name'); $table->timestamps(); }); Save the file, go back to the terminal, run php artisan
0 码力 |
111 页 |
14.25 MB
| 1 年前 3
-
nouvelle variable. Utiliser const et let • Types : – Primitifs : Boolean Null Undefined Number String Symbol – Objets : Object Function • Particularités – Prototypes18 – Fermetures19 – Promesses20 dev/articles/promises?hl=fr 3 escape(), unescape(), isFinite(), isNaN(), parseFloat(), parseInt(), Number(), String(), eval(), ... JavaScript dans la page web • Éléments