Laravel 5.0 Documentation
version of Laravel's cache, inject Illuminate\Contracts\Cache\Repository instead. Replace any calls to $paginator->links() with $paginator->render() . Laravel 5.0 now requires "pda/pheanstalk": with your Homestead environment. As files within these folders are changed, they will be kept in sync between your local machine and the Homestead environment. You may configure as many shared folders You may also use the View facade: View::share('data', [1, 2, 3]); Typically, you would place calls to the share method within a service provider's boot method. You are free to add them to the0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning LaravelChapter 48: Queues 144 Introduction 144 Examples 144 Use-cases 144 Queue Driver Configuration 144 sync 144 database 144 sqs 144 iron 145 redis 145 beanstalkd 145 null 145 Chapter 49: Remove public $role->permissions()->detach([1, 2, 3]); Syncing Associations You may also use the sync method to construct many-to-many associations. The sync method accepts an array of IDs to place on the intermediate table. Any //will keep permission id's 1,2,3 against Role id 1 $role= App\Role::find(1) $role->permissions()->sync([1, 2, 3]); Read Eloquent : Relationship online: https://riptutorial.com/laravel/topic/7960/eloquent---0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 3.2 Documentationthe base Eloquent model. Added $hidden static variable to the base Eloquent model. Added sync method to has_many_and_belongs_to Eloquent relationship. Added save method to has_many Eloquent php file for the bundle if it is present. Note: The bundle will only be started once. Subsequent calls to the start method will be ignored. 43 If you use a bundle throughout your application ole_id, array('expires' => $expires)); Alternatively, you can use the sync method, which accepts an array of IDs to "sync" with the intermediate table. After this operation is complete, only the0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.2 中文文档com/LaravelCollective/iron-queue 任务/队列 php artisan make:job 命令现在默认会创建一个队列任务类,如果你想要创建一个同步任 务(非队列),在使用该命令时加上 --sync 选项。 邮件 邮件配置中移除了 pretend 选项,取而代之的,使用 log 邮件驱动执行和 pretend 同样的 功能,并且将邮件信息记录到日志中。 分页 为了与框架生成的其它 你还可以使用 sync 方法构建多对多关联。sync 方法接收数组形式的 ID 并将其放置到中间 表。任何不在该数组中的 ID 对应记录将会从中间表中移除。因此,该操作完成后,只有在 数组中的 ID 对应记录还存在于中间表: $user->roles()->sync([1, 2, 3]); 你还可以和 ID 一起传递额外的中间表值: $user->roles()->sync([1 => ['expires'0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.1 中文文档你还可以使用 sync 方法构建多对多关联。sync 方法接收数组形式的 ID 并将其放置到中间 表。任何不在该数组中的 ID 对应记录将会从中间表中移除。因此,该操作完成后,只有在 数组中的 ID 对应记录还存在于中间表: $user->roles()->sync([1, 2, 3]); 你还可以和 ID 一起传递额外的中间表值: $user->roles()->sync([1 => ['expires'0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.6 中文文档你还可以使用 sync 方法构建多对多关联。sync 方法接收数组形式的 ID 并将其放置到中间表。任何不在该数组中的 ID 对应记录将会从中间表中移 除。因此,该操作完成后,只有在数组中的 ID 对应记录还存在于中间表: $user->roles()->sync([1, 2, 3]); 你还可以和 ID 一起传递额外的中间表值: $user->roles()->sync([1 => ['expires' * 事件被推送的队列名称. * * @var string */ public $broadcastQueue = 'your-queue-name'; 如果你想要使用 sync 队列而不是默认的队列驱动来广播事件,可以实现 ShouldBroadcastNow 接口来取代 ShouldBroadcast:0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.3 中文文档你还可以使用 sync 方法构建多对多关联。sync 方法接收数组形式的 ID 并将其放置到中间表。任 何不在该数组中的 ID 对应记录将会从中间表中移除。因此,该操作完成后,只有在数组中的 ID 对应记录还存在于中间表: $user->roles()->sync([1, 2, 3]); 你还可以和 ID 一起传递额外的中间表值: $user->roles()->sync([1 =>0 码力 | 691 页 | 9.37 MB | 1 年前3
Laravel 6.0 中文文档广播时你想要使用的队列名称: /** * 事件被推送的队列名称. * * @var string */ public $broadcastQueue = 'your-queue-name'; 如果你想要使用 sync 队列而不是默认的队列驱动来广播事件,可以 实现 ShouldBroadcastNow 接口来取代 ShouldBroadcast: 本文档由学院君提供 学院君致力于提供优质 Laravel 你还可以使用 sync 方法构建多对多关联。sync 方法接收数组形式的 ID 并将其放置到中间表。任何不在该数组中的 ID 对应记录将会从 中间表中移除。因此,该操作完成后,只有在数组中的 ID 对应记录 还存在于中间表: $user->roles()->sync([1, 2, 3]); 你还可以和 ID 一起传递额外的中间表值: $user->roles()->sync([1 => ['expires'0 码力 | 1442 页 | 14.66 MB | 1 年前3
The Laravel Handbook
Route::delete( '/dog/{id}', [DogController::class, 'delete'] )->name('dog.delete'); This calls the delete method on the DogController , so we go to app/Http/Controllers/DogController.php0 码力 | 111 页 | 14.25 MB | 1 年前3
共 9 条
- 1













