https://www.youtube.com/watch?v=EU7PRmCpx-0&list=PLillGF-RfqbYhQsN5WMXy6VsDMKGadrJ-
===========================
1.Laravel From Scratch [Part 1] – Series Introduction(lsapp1 folder)
2.Laravel From Scratch [Part 2] – Environment Setup & Laravel Installation(lsapp2 folder)
3.Laravel From Scratch [Part 3] – Basic Routing & Controllers(lsapp folder)
- Routes is done on routes/web.php
- php artisan make:controller PagesController`
- Controllers present in app\Http\Controllers\PagesController.php
4.Laravel From Scratch [Part 4] – Blade Templating & Compiling Assets
- Install Laravel Blade Snippets Extension
- Use of @yield(‘content’),@extends(‘layouts.app’),@section(‘content’)and @endsection
- Css files in pubic/css/app.css ()
- Install npm Extension
- Install node.js on your opeerating system
- In terminal run code, `npm install`
- node_modules is created after that.
- In bash run, `npm run dev`===>changes appear in website
- In bash run, `npm run watch`==>changes simultaneously
- Create,your custom resources/assets/sass/_custom.scss(your custom css file)
- Import that file in app.scss (@import ‘custom’;)
- Include command `@include(‘inc.navbar’)`
5.Laravel From Scratch [Part 5] – Models & Database Migrations
i.Create database in phpmyadmin(say db `lsapp`)
ii.Bashcommand ‘php artisan make:controller PostsController’
iii.Bashcommand ‘php artisan make:model Post -m’
Output:Model created successfully.
Created Migration: 2018_06_03_104812_create_posts_table
Post model goes to app/Post.php
2018_06_03_104812_create_posts_table goes to database folder.
””’Install Laravel 5 Snippets””’
iii.In Propeviders type following to increase string size.
use Illuminate\Support\Facades\Schema;
public function boot()
{
//
Schema:defaultStringLength(191);
}
iii.Run ‘php artisan:migrate’
iv.Tinker (Run tinker command in bash)
$ php artisan tinker
Psy Shell v0.9.4 (PHP 7.2.5 — cli) by Justin Hilemanan
>>> App\Post::count()
=> 0
>>> $post=new App\Post();
=> App\Post {#2314}
>>> $post->title=’Post 0ne’;
=> “Post 0ne”
>>> $post->body=’This is the post one body’;
=> “This is the post one body”
>>> $post->save();
=> true
v.bash command : `php artisan make:controller PostsController –resource`
vi.bash command to list all routes: `php artisan route:list`
6.Laravel From Scratch [Part 6] – Fetching Data With Eloquent