Loading...
Loading...
Use Laravel-specific vocabulary—Eloquent patterns, Form Requests, API resources, jobs/queues—to get idiomatic framework code
npx skill4agent add noartem/laravel-vue-skills laravel-laravel-prompting-patternsUser::where('active', true)
->with('posts')
->get();scopeActive($query)post_tagbelongsToManybelongsToManyattach()detach()sync()authorcategorywithCount('comments')published_atcategory_idpublic function rules(): array
{
return [
'email' => ['required', 'email', 'unique:users,email'],
'password' => ['required', 'min:12', Password::defaults()],
'name' => ['required', 'string', 'max:255'],
];
}messages()Rule::exists('products', 'id')items.*.quantityRule::requiredIf()new HasSufficientStockProductControllerProductResourceProductCollectionauth:sanctumProductStoreRequestProductUpdateRequestProduct::paginate(20)ProductResource::collection($products)totalper_pagecurrent_pagelast_page?page=2?category=electronics&min_price=100when()ProductFiltersSendWelcomeEmail::dispatch($user)
->onQueue('emails')
->delay(now()->addMinutes(5));ShouldQueue$tries = 3$timeout = 30failed()$tags = ['user:'.$user->id]redisqueue:work --queue=payments,defaultretry_afterBus::chain([
new ValidateInventory($order),
new ChargePayment($order),
new SendConfirmation($order),
])->dispatch();catch()hasManybelongsTobelongsToManymorphManyscopeActivescopePublishedget{Attribute}Attributeset{Attribute}Attributeprotected $casts = ['published_at' => 'datetime']UserStoreRequestProductUpdateRequestrequiredunique:table,columnexists:table,columnnew UppercaseRule::in(['admin', 'user'])UserResourceProductCollectionpaginate()simplePaginate()cursorPaginate()throttle:60,1ShouldQueuedispatch()dispatchSync()Bus::chain()Bus::batch()