Laravel 5.0 Documentation
Requirements ii. Configuration i. Introduction ii. After Installation iii. Accessing Configuration Values iv. Environment Configuration v. Configuration Caching vi. Maintenance Mode vii. Pretty URLs any appropriate values there, like your APP_ENV and APP_KEY (your encryption key), your database credentials, and your cache and session drivers. Additionally, copy any custom values you had in your configuration, view the full documentation. Note: You will need to place the appropriate .env file and values on your production server before deploying your Laravel 5 application. Laravel 5.0 no longer uses0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 3.2 Documentationto specify the values that should be used instead of the route's URI wildcards. It's easy to replace the wildcards with proper values: Redirecting to a named route with wildcard values: return Red Redirect::to_route('profile', array($username)); Redirecting to an action with wildcard values: return Redirect::to_action('user@profile', array($username)); 36 Redirecting With Flash Data specify the values that should be used instead of the route's URI wildcards. It's easy to replace the wildcards with proper values: 52 Generating a URL to a named route with wildcard values: $url0 码力 | 139 页 | 1.13 MB | 1 年前3
Learning LaravelContains to check if a collection satisfies certain condition 32 Using Pluck to extract certain values from a collection 32 Using Map to manipulate each element in a collection 33 Using sum, avg, min syntax), we output the $name variable. To pass this value to our view, we would pass an array of values when calling the view helper: https://riptutorial.com/ 17 view('example', ['name' => $name]); properties. 5.3 Please note, that since Laravel 5.3 the where() method will try to loosely compare the values by default. That means when searching for (int)1, all entries containing '1' will be returned as0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.1 中文文档方法执行插入语句。和 select 一样,改方法将原生 SQL 语句作为第 一个参数,将绑定作为第二个参数: DB::insert('insert into users (id, name) values (?, ?)', [1, 'D ayle']); 2.4 运行更新语句 update 方法用于更新数据库中已存在的记录,该方法返回受更新语句影响的行数: $affected = DB::update('update 学院(LaravelAcademy.org)提供 132 sortByDesc splice sum take toArray toJson transform unique values where whereLoose zip 3、自定义集合 如果你需要在自己扩展的方法中使用自定义的集合对象,可以重写模型上的 newCollection 方法: sort(); $sorted->values()->all(); // [1, 2, 3, 4, 5] 排序后的集合保持原来的数组键,在本例中我们使用 values 方法重置键为连续编号索引。 要为嵌套集合和对象排序,查看 sortBy 和 sortByDesc 方法。 如果你需要更加高级的0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档collapse, flatten, flip 方法现在会返回集 合基类。 保留键名 slice、chunk 和 reverse 方法现在会保留集合的键名,如果你不想这些方法保留键名,使 用集合实例的 values 方法即可。 Composer 类 Illuminate\Foundation\Support\Composer 类现在被移动 到 Illuminate\Support\Composer 方法执行插入语句。和 select 一样,改方法将原生 SQL 语句作为 第一个参数,将绑定作为第二个参数: DB::insert('insert into users (id, name) values (?, ?)', [1, 'D ayle']); 运行更新语句 update 方法用于更新数据库中已存在的记录,该方法返回受更新语句影响的行数: $affected = DB::update('update shuffle slice sort sortBy sortByDesc splice sum take toArray toJson transform unique values where whereLoose zip 3、自定义集合 如果你需要在自己扩展的方法中使用自定义的集合对象,可以重写模型上 的 newCollection 方法:0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.6 中文文档be between :min - :max.', 'in' => 'The :attribute must be one of the following types: :values', ]; 为给定属性指定自定义信息 有时候你可能只想为特定字段指定自定义错误信息,可以通过“.”来实现,首先指定属性名,然后是规则: $messages = [ 本文档由 Laravel 方法执行插入语句。和 select 一样,该方法将原生 SQL 语句作为第一个参数,将参数绑定作为第二个参数: DB::insert('insert into users (id, name) values (?, ?)', [1, '学院君']); 运行更新语句 update 方法用于更新数据库中已存在的记录,该方法返回受更新语句影响的行数: $affected = DB::update('update Redis 命令如下: Redis::set('name', 'Taylor'); $values = Redis::lrange('names', 5, 10); 此外,还可以使用 command 方法传递命令到服务器,该方法接收命令名作为第一个参数,参数值数组作为第二个参数: $values = Redis::command('lrange', ['name', 5, 10]);0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.3 中文文档be between :min - :max.', 'in' => 'The :attribute must be one of the following types: :values', ]; 为给定属性指定自定义信息 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 中文学习资源 319 public function put($key, $value, $minutes) {} public function putMany(array $values, $minutes); public function increment($key, $value = 1) {} public function decrement($key 方法执行插入语句。和 select 一样,改方法将原生 SQL 语句作为第一个 参数,将绑定作为第二个参数: DB::insert('insert into users (id, name) values (?, ?)', [1, 'Dayle 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档:attribute must be between :min - :max.', 'in' => 'The :attribute must be one of the foll owing types: :values', ]; 为给定属性指定自定义信息 有时候你可能只想为特定字段指定自定义错误信息,可以通过“.”来实 现,首先指定属性名,然后是规则: 本文档由学院君提供 学院君致力于提供优质 Laravel field is required when payment type is cc. 如果你想要替换支付类型值 cc,可以在 validation 语言文件中定 义一个 values 数组来指定自定义的表示值: 'values' => [ 'payment_type' => [ 'cc' => 'credit card' ], ], 这样一来,如果验证规则验证失败,对应的错误信息如下: many(array $keys); public function put($key, $value, $seconds) {} public function putMany(array $values, $seconds); public function increment($key, $value = 1) {} public function decrement($key, $value0 码力 | 1442 页 | 14.66 MB | 1 年前3
The Laravel Handbook
insert data using this SQL query: INSERT INTO "dogs" ("id", "name", "created_at", "updated_at") VALUES ('1', 'Roger', '2023-05-11 09:27:20', '2023-05-11 09:27:20'), ('2', 'Syd', '2023-05-11 09:29:52'0 码力 | 111 页 | 14.25 MB | 1 年前3
共 9 条
- 1













