Skip to content

Instantly share code, notes, and snippets.

@poloey
Created March 10, 2018 18:27
Show Gist options
  • Save poloey/8b6bb4c8a798c608db46d4f9cad09c4c to your computer and use it in GitHub Desktop.
Save poloey/8b6bb4c8a798c608db46d4f9cad09c4c to your computer and use it in GitHub Desktop.
laravel_crud
Installing laravel
describing route model view controller
showing folder structure with factory and migration
artisan command
php artisan make:model make:controller make:factory make:migration
git include
php artisan make:model Post -a (but I won't do that, do later)
crud
--------
read all
read single
create form
store
edit form
update
delete
resource
showing route page
get
post
put
patch
delete
basic routing inside hello world and make a controller and model to show basic stuff
git clean -fd
starting real crud
php artisan make:model Post -a
show all 4 file and describe
write migration
added schema default string length
make a mysql database
added connection
php artisan migrate
added factory and database factory and seeding data
login to mysql and show data
go to model add fillable or guarded = ''
resource route
php artisan route list
go to controller
start sowing index with all post
resources/views/posts/index.blade.php
authenticate
showing user name
use @auth
redirecto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment