Wiki - Development - Laravel
Introduction
Table of contents
General documentation
Directoy Structure
- Directory Structure
. +-- app | +-- Http | | +-- Controllers | | | +-- Controller.php | | +-- Middleware | | +-- VerifyCsrfToken.php | +-- [Model].php | +-- database | +-- migrations | +-- date_filename.php | +-- public | +-- css | | +-- app.css | +-- js | | +-- app.js | +-- index.php | +-- recourses | +-- js | +-- sass | +-- views | +-- welcome.blade.php | +-- routes | +-- web.php
Starting
- Create new project
laravel new [projectname] - Edit the
.env.file
Routing
CRUD
- GET
/projects-> index (all projects) - GET
/projects/1-> show (1 project) - GET
/projects/create-> create (create form) - POST
/projects-> store (insert project) - GET
/projects/1/edit-> edit (edit project) - PATCH
/projects/1-> update (update project) - DELETE
/projects/1-> destory (delete project)
Artisan
- Create controller:
php artisan make:controller [-r] [ControllerName] [-m] [Model] - Create migration:
php artisan make:migration [create_example_table] - Create model:
php artisan make:model [Name] - Maintenance Mode:
php artisan downTinker
php artisan tinkerMigrations
Database version control.
php artisan migrateinstallphp artisan migrate:rollback- Drop all tables:
php artisan migrate:fresh
Tutorials
Laracasts
- Laravel 6 From Scratch ✅
- What’s New in Laravel 7 ⌛
- What’s New in Laravel 8 ⌛
- Static Site Generators 🕐
- Learn Telescope 🕐
- Build a Laravel App With TDD ⌛
- Build a Staging Server 🕐
Defenition
- Todo: 🕐
- Doing: ⌛
- Done: ✅
Samples
- https://github.com/jivanrij/laravel-samples
Laracon 2021
- https://onramp.dev/
Diving the Queue
- Single Jobs
- Chain Jobs (https://laravel.com/docs/master/queues#job-chaining)
- Batch Jobs ()