Stubs in Laravel
Customize Artisan-generated class templates by publishing and editing stub files.
Customize Artisan-generated class templates by publishing and editing stub files.
Go beyond create table: rollbacks, batching, raw SQL, and safe production migration habits.
Mark records as deleted without removing rows, restore them later, and query trashed models.
Create Eloquent models that map to database tables, set fillable fields, and define relationships.
Fetch, filter, sort, and paginate records using Eloquent query builder methods.
Generate correct URLs in Blade using route() helpers for links, buttons, and forms.
Create a helpers.php file, autoload it with Composer, and reuse small utility functions across your app.
Transform attributes when reading (accessors) and writing (mutators) Eloquent model data.
Store temporary user data with session helpers, flash messages, and secure session configuration.
Learn what Laravel is, why developers use it, and how to install Laravel with Composer step by step.