Migrating a PHP App to Laravel
18 items · Technical · Hard difficulty · 2 hours
Step-by-step checklist to move a legacy PHP app into a modern Laravel structure.
-
Audit codebase and dependencies
List PHP version, libraries, custom frameworks, and deprecated code.
-
Export database schema and constraints
Dump schema, FK relations, and indexes for model mapping.
- Create new Laravel project scaffold
-
Install required Composer packages
Add auth, queue, and DB drivers needed for your app.
-
Configure environment (.env) and app settings
Set DB, cache, queue, mail, and APP_KEY values.
-
Set up version control and branch strategy
Create a migration branch and define CI hooks and reviews.
-
Map legacy routes to Laravel routes
List endpoints, HTTP verbs, and middleware equivalents.
-
Create controllers and map actions
Group related endpoints into controllers and actions.
-
Extract business logic into service classes
Move domain logic out of controllers into reusable services.
-
Create Eloquent models and relationships
Define models, casts, fillable, relationships, and accessors.
-
Write database migrations and seeders
Translate schema to Laravel migrations and create seeders.
-
Run data migration scripts and verify integrity
Migrate production data and validate row counts and FK integrity.
-
Convert PHP views to Blade templates and update assets
Replace includes, echo syntax, and update asset paths.
-
Implement authentication and authorization with Laravel
Use Breeze/Jetstream or guards and map roles/permissions.
-
Migrate queues, jobs, and scheduled tasks
Map cron jobs to scheduler and legacy jobs to Laravel jobs/queues.
-
Port tests to Laravel's PHPUnit TestCase
Convert or rewrite unit and feature tests to Laravel format.
-
Configure CI/CD and deployment for Laravel
Update build, run migrations, and set env handling in deployment.
-
Run end-to-end QA, performance tests, and create rollback plan
Smoke test endpoints, load test, and document rollback steps.
Printed from TickYouOff — the interactive version tracks your progress and can be shared with others.