Skip to content

MadukaPcm/laravel-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LARAVEL LEARNING:

Project Creation & Setup

Create New Laravel Project

composer create-project laravel/laravel project-name
laravel new project-name

Install Dependencies

composer install

Environment Setup

cp .env.example .env
php artisan key:generate

Server Management

php artisan serve
php artisan serve --port=9000
php artisan serve --host=0.0.0.0 --port=8000

Database & Migrations & run migrations.

php artisan make:migration create_table_name_table
php artisan migrate

Rollback Last Migration & Rollback All Migrations

php artisan migrate:rollback
php artisan migrate:reset

Rollback and Re-run Migrations & Check Migration Status

php artisan migrate:refresh
php artisan migrate:status

Create Migration with Schema

php artisan make:migration create_users_table --create=users

Create Basic Model & Create Model with Migration

php artisan make:model ModelName
php artisan make:model ModelName -m

Create Model with Migration and Controller

php artisan make:model ModelName -mc

Create Model with All Components (API) [ MAIN ]

php artisan make:model ModelName -a --api

Create Basic Controller

php artisan make:controller ControllerName

Create API Resource Controller

php artisan make:controller ControllerName --api

Create Controller with Model

php artisan make:controller ControllerName --model=ModelName

API Resource Commands

Create API Resource

php artisan make:resource ResourceName

Create API Resource Collection

php artisan make:resource ResourceName --collection

Create Form Request

php artisan make:request RequestName

Route Commands: List All Routes

php artisan route:list

List API Routes Only

php artisan route:list --path=api

Cache Routes

php artisan route:cache

Clear Route Cache

php artisan route:clear

About

Learning Laravel Framework with Rest-APIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages