Results: 1022
Large buttons with class
btn-lg
<button type="button" class="btn btn-primary btn-lg">Large primary</button>
<button type="button" class="btn btn-secondary btn-lg">Large secondary</button>
Medium buttons with no special class because it's default
<button type="button" class="btn btn-primary">Default primary</button>
    <button type="button" class="btn btn-secondary">Default secondary</button>
Small buttons with class
btn-sm
<button type="button" class="btn btn-primary">Small primary</button>
    <button type="button" class="btn btn-secondary btn-sm">Small secondary</button>
Only the post author will be able to see
delete
and
edit
links
@if (!Auth::guest())
    @if (Auth::user()->id == $post->user_id)
        <!-- delete and edit links -->
    @endif
@endif
Inside
Post
model
public function user() {
    return $this->belongsTo('App\User');
}
Inside
User
model
public function posts() {
    return $this->hasMany('App\Post');
}
Authentication links for guests
@guest
    <!-- Authentication Links for Guests -->
@else
    <!-- HTML for Authenticated Users -->
@endgues
authentication routes
Registers all the necessary routes for authentication
Auth::routes();
We can order posts by
created_at
with
descending
order, to see the newly created posts at the top
Shows all the routes that we have in our application
 php artisan route:list
create table
Schema::create('posts', function (Blueprint $table) {
    $table->id();
    $table->string('title');
    $table->mediumText('content');
    $table->timestamps();
});
$table->id()
- creates
bigint(20)
unsigned auto-increment field
$table->string('title')
- creates
varchar(255)
utf8mb4_unicode_ci field
$table->mediumText('content')
- creates
mediumtext
utf8mb4_unicode_ci field
$table->timestamps()
- creates
created_at
and
updated_at
timestamps
.env
file contains database config information that needs to be changed to use the database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=lara4db
DB_USERNAME=root
DB_PASSWORD=
ctrl + p
-> search
ext install laravel blade
-> install
laravel blade snippets
extension
Results: 1022