Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.
Why they ask this: The starting point for any Laravel interview; it shows you know where code belongs.
Answer
MVC (Model–View–Controller) separates an application into three parts:
app/Models), each mapped to a database table.resources/views), or JSON from API Resources in an API.app/Http/Controllers).The flow: route (routes/web.php or routes/api.php) → middleware → controller → model → view or JSON response.
Route::get('/jobs/{job}', [JobController::class, 'show']);
class JobController extends Controller
Why they ask this: Every team project uses migrations; this checks you can work safely with a shared database schema.
Answer
Migrations are version control for the database schema. Each migration is a PHP class with an up() method that makes a change and a down() method that reverses it.
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->foreignId('company_id')->constrained()->cascadeOnDelete();
Why they ask this: Checks that your PHP knowledge is current and not stuck in PHP 5-era habits.
Answer
In bigger apps, keep controllers thin and move business logic into service or action classes.
Useful commands: php artisan make:migration, migrate, migrate:rollback, migrate:status.
Why they are useful:
php artisan migrate.Never edit a migration that has already run in production. Create a new one instead.
public function find(int $id): ?User.public function __construct(private UserRepository $users) {}.str_pad(string: $code, length: 6, pad_string: '0', pad_type: STR_PAD_LEFT).match expression: strict comparison and returns a value, unlike switch.$user?->profile?->phone.enum Status: string { case Active = 'active'; }.readonly properties (8.1) and readonly classes (8.2) for immutable value objects and DTOs.array_map($this->format(...), $rows).get/set logic declared on a property.enum JobType: string
{
case FullTime = 'full_time';
case Internship = 'internship';
public function label(): string
{
return match ($this) {
self::FullTime => 'Full time',
self::Internship => 'Internship',
};
}
}