php artisan tinkerecho App\Post::count();
Creates new post in posts table using tinker from terminal$post = new App\Post();
$post->title = 'the post title';
$post->content = 'the post body';
$post->save();
Deletes the newly created post$post->delete();posts)class Post extends Model
{
// Table Name
protected $table = 't_posts';
}id)class Post extends Model
{
// Primary key
public $primaryKey = 'record_id';
}true)class Post extends Model
{
// Timestamps
public $timestamps = false;
}$posts = Post::All();
return view('posts.index')->with('posts', $posts);title descending$posts = Post::orderBy('title', 'asc')->get();
return view('posts.index')->with('posts', $posts);where methodpublic function index()
{
$posts = Post::where('title', 'pst')->get();
return view('posts.index')->with('posts', $posts);
}