Shows count of posts
echo 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();
by Valeri Tandilashvili
4 years ago
Laravel
tinker commands
Laravel From Scratch
0
Pro tip: use ```triple backticks around text``` to write in code fences