FlashKeepers

PHP and Ruby · College · College and University

Laravel Fundamentals

Laravel routing, controllers, Eloquent ORM, Blade templates, migrations, middleware and artisan commands.

About this set

35 basic cards for College PHP and Ruby. It opens with "Route parameter syntax in Laravel" and "Define a POST route in Laravel". Study it alongside the other College sets below.

35 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

Route parameter syntax in Laravel
Show answerEnclosed in curly braces, like {id} in /posts/{id}
Define a POST route in Laravel
Show answerUse Route::post() method
Purpose of route groups in Laravel
Show answerApply common middleware, prefixes, or namespaces to multiple routes
Named routes in Laravel
Show answerRoutes given aliases with ->name() for generating URLs and redirects
Apply middleware to a single route
Show answerUse ->middleware() when defining the route
Where to store controller classes
Show answerapp/Http/Controllers/ directory
Controller naming convention
Show answerPascalCase class names ending with Controller
Dependency injection in controller methods
Show answerType-hint dependencies as parameters for automatic service container resolution
Seven resource controller actions
Show answerindex, show, create, store, edit, update, destroy
Purpose of __construct() in a controller
Show answerInitialize class properties or dependencies before any action method runs
What Eloquent is
Show answerLaravel's Object-Relational Mapping (ORM) library
Eloquent Model
Show answerA class representing a database table with query and relationship methods
Fetch all records from a table using Eloquent
Show answerModel::all() returns a collection of all records
Difference between hasMany and belongsTo
Show answerhasMany: one model has many others; belongsTo: inverse, many belong to one
N+1 query problem in databases
Show answerRunning one query per related model instead of loading all relationships at once

20 more cards in the app

Study this set free