Laravel 3.2 Documentationfolder. Laravel 3.2 Added to_array method to the base Eloquent model. Added $hidden static variable to the base Eloquent model. Added sync method to has_many_and_belongs_to Eloquent Allows pivot table timestamps to be disabled. Made the get_timestamp Eloquent method static. Request::secure now takes application.ssl configuration option into consideration. 'Laravel\\Blade', Update Eloquent many-to-many tables. Eloquent now maintains created_at and updated_at column on many-to-many intermediate tables by default. Simply add these columns to your tables. Also, many-to-0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.0 Documentation
User extends Eloquent { use SoftDeletingTrait; } You must also manually add the deleted_at column to your dates property: class User extends Eloquent { use SoftDeletingTrait; protected encrypt option to your queue configuration file: 'encrypt' => true Laravel 4.1.29 improves the column quoting for all database drivers. This protects your application from some mass assignment vulnerabilities Upgrading To 4.1.26 From <= 4.1.25 This change requires the addition of a new remember_token column to your users (or equivalent) database table. After this change, a fresh token will be assigned0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning Laravelnot defined in a model the default will be used. You may also specify another connection using the static on method: // Using the sqlite connection Table::on('sqlite')->select(...)->get() // Using the $table->increments('id'); $table->string('first_string_column_name'); $table->integer('secont_integer_column_name'); $table->timestamps(); }); } you can accomplish by creating a new migration.And In the up method of your migration. //Renaming Column. public function up() { Schema::table('users', function (Blueprint $table) { $0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.1 中文文档public static function create(array $attributes = []){ // Your custom implementation } find 方法 如果你要在自己的模型中重写 find 方法并在其中调用 parent::find(),应该改由调用 Eloquent 查询构建器的 find 方法: public static function function find($id, $columns = ['*']){ $model = static::query()->find($id, $columns); // ... return $model; } lists 方法 lists 方法现在返回一个 Collection 实例而不是包含 Eloquent 查询结果的数组,如果你想 将 Collection extends Facade{ /** * 获取组件注册名称 * * @return string */ protected static function getFacadeAccessor() { return 'cache'; } } Cache 门面继承 Facade 基类并定义了 getFacadeAccessor0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档extends Facade{ /** * 获取组件注册名称 * * @return string */ protected static function getFacadeAccessor() { return 'cache'; } } Cache 门面继承 Facade 基类并定义了 getFacadeAccessor 等同于数据库中的 DATETIME 类型 $table->decimal('amount', 5, 2); 等同于数据库中的 DECIMAL 类型,带一个精度和范围 $table->double('column', 15, 8); 等同于数据库中的 DOUBLE 类型,带精度, 总共 15 位数字,小数点 后 8 位. $table->enum('choices', ['foo', 'bar']); ); }); 下面是所有可用的列修改器列表,该列表不包含索引修改器: 修改器 描述 ->first() 将该列置为表中第一个列 (仅适用于 MySQL) ->after('column') 将该列置于另一个列之后 (仅适用于 MySQL) ->nullable() 允许该列的值为 NULL ->default($value) 指定列的默认值 ->unsigned()0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.6 中文文档Joomla Katana Kirby Magento OctoberCMS Sculpin Slim Statamic Static HTML Symfony WordPress Zend 以上支持的驱动文件位于 ~/.composer/vendor/laravel/valet/cli/drivers 的,该方法会返回磁盘上的完整路径,如果输入请求不 是请求静态文件,则返回 false: /** * Determine if the incoming request is for a static file. * * @param string $sitePath * @param string $siteName * @param string $uri extends Facade { /** * 获取组件注册名称 * * @return string */ protected static function getFacadeAccessor() { return 'cache'; } } Cache 门面继承 Facade 基类并定义了 getFacadeAccessor0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.3 中文文档该方法会返回磁盘上的完整路径,如果输入请求不是请求静态文件,则返回 false: /** * Determine if the incoming request is for a static file. * * @param string $sitePath 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 extends Facade{ /** * 获取组件注册名称 * * @return string */ protected static function getFacadeAccessor() { return 'cache'; } } Cache 门面继承 Facade 基类并定义了 getFacadeAccessor 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 182 验证字段必须是格式化的电子邮件地址 exists:table,column 验证字段必须存在于指定数据表 基本使用: 'state' => 'exists:states' 指定自定义列名: 'state' => 'exists:states,abbreviation'0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档\Illuminate\Database\Query\Builder 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 16 */ public static function table($table, $as = null, $conn ection = null) cursor 方法 影响级别:低 cursor 方法现在返回的 是 Il Jigsaw Joomla Katana Kirby Magento OctoberCMS Sculpin Slim Statamic Static HTML Symfony WordPress Zend 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 式文件,如果文件是静态的,该方法会返回磁盘上的完整路径,如果 输入请求不是请求静态文件,则返回 false: /** * Determine if the incoming request is for a static f ile. * * @param string $sitePath * @param string $siteName * @param string $uri * @return0 码力 | 1442 页 | 14.66 MB | 1 年前3
The Laravel Handbook
intro. We’ll see more about Blade with components later. 4. Dynamic routes We’ve seen how to create static routes with Laravel. Sometimes you want your routes to be dynamic. This will be especially useful 102 Route::get('/dogs', function () { return view('dogs'); })->name('dogs'); This is a static route, that responds on the /dogs URL. Now suppose you want to create a page for each single dog dog, maybe you’ll fill that with a description, an image, whatever. You can’t create a static route for each dog in the database, because you don’t know the name of the dog. Imagine you have 2 dogs0 码力 | 111 页 | 14.25 MB | 1 年前3
共 9 条
- 1













