Makes controller for
Posts
php artisan make:controller PostsController
With the following basic content
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class Postscontroller extends Controller
{
    //
}
Creates controller and empty methods in it (with appropriate comments)
php artisan make:controller PostsController --resource
The methods are:
index()
- Displays a list of the resource.
create()
- Shows the form for creating a new resource
store(Request $request)
- Stores a newly created resource in storage
show($id)
- Displays the specified resource
edit($id)
- Shows the form for editing the specified resource
update(Request $request, $id)
- Updates the specified resource in storage
destroy($id)
- Removes the specified resource from storage
by Valeri Tandilashvili
4 years ago
Laravel
artisan commands
Laravel From Scratch
1
Pro tip: use ```triple backticks around text``` to write in code fences