Laravel 3.2 DocumentationEloquent natively supports all of the methods from Laravel's Fluent query-builder. Application Logic can be implemented within your application either using controllers (which many web-developers are links site-wide. Restful Controllers are an optional way to separate your GET and POST request logic. In a login example your controller's get_login() action would serve up the form and your controller's side-navigation view that contains a list of random blog posts. Your composer would contain the logic to load the blog posts so that all you have to do i load the view and it's all ready for you. This0 码力 | 139 页 | 1.13 MB | 1 年前3
Laravel 5.0 Documentation
command. * * @return void */ public function handle() { // Handle the logic to purchase the podcast... event(new PodcastWasPurchased($this->user, $this->podcast)); This new architecture allows for the easier construction of similar global traits, and a cleaner separation of concerns within the framework itself. More information on the new SoftDeletingTrait may 'User', function() { throw new NotFoundHttpException; }); If you wish to use your own resolution logic, you should use the Router::bind method. The Closure you pass to the bind method will receive0 码力 | 242 页 | 1.44 MB | 1 年前3
Learning Laravelauthorisation using the AuthServiceProvider while Policies allow you to organise authorisation logic around models using classes. Examples Using Gates Gates are closures that determine if a user is takes care of that for you. Policies Policies are classes that help you organise authorisation logic around a model resource. Using our previous example, we might have a ContentPolicy that manages user the associated model as arguments, and either authorizes the action based on your authorisation logic or denies the action and throws an AuthorizationException which the Laravel Exception handler converts0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.6 中文文档次。如果不能获取锁,需要将任务释放回队列以便可以再次执行: Redis::throttle('key')->allow(10)->every(60)->then(function () { // Job logic... }, function () { // Could not obtain lock... return $this->release(10); }); 注:在上面的例子中,key funnel 方法你可以给定类型任务一次只能由一个工作进程进行处理: Redis::funnel('key')->limit(1)->then(function () { // Job logic... }, function () { // Could not obtain lock... return $this->release(10); }); 注:0 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 5.1 中文文档$podcastId) { $podcast = Podcast::findOrFail($podcastId); // Purchase podcast logic... Event::fire(new PodcastWasPurchased($podcast)); } } 此外,你还可以使用全局的帮助函数 event 来触发事件:0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 6.0 中文文档次。如果不能获取锁,需要将任务释放回队列以便可以再次执 行: Redis::throttle('key')->allow(10)->every(60)->then(fu nction () { // Job logic... }, function () { // Could not obtain lock... return $this->release(10); }); 注:在上面的例子中,key (1)->then(function () { 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 904 // Job logic... }, function () { // Could not obtain lock... return $this->release(10); }); 注:使用频率限制时,任务在运行成功之前需要的最大尝0 码力 | 1442 页 | 14.66 MB | 1 年前3
Laravel 5.2 中文文档$podcastId) { $podcast = Podcast::findOrFail($podcastId); // Purchase podcast logic... Event::fire(new PodcastWasPurchased($podcast)); } } 本文档由 Laravel 学院(LaravelAcademy0 码力 | 377 页 | 4.56 MB | 1 年前3
Laravel 5.3 中文文档ship($orderId) { $order = Order::findOrFail($orderId); // Order shipment logic... 本文档由 Laravel 学院(LaravelAcademy.org)提供 Laravel 学院致力于提供优质 Laravel 中文学习资源 3300 码力 | 691 页 | 9.37 MB | 1 年前3
共 8 条
- 1













