Apr 24, 2025
.blade.phpresources/viewsreturn view('nama_template', $data);Route::get('/hello', function () {
return view('hello', ['name' => 'Eko']);
});
{{ $variabel }}.{{-- komentar --}.htmlspecialchars untuk melindungi dari XSS.{!! $variabel !!} (hati-hati dengan input dari pengguna).@ sebelum sintaks.@{{ $variabel }}.@if, @elseif, @else, dan @endif.@if($hobiCount === 1)
I have one hobby.
@elseif($hobiCount > 1)
I have multiple hobbies.
@else
I don't have any hobbies.
@endif
@unless.@unless($isAdmin)
You are not admin.
@endunless
php artisan make:test NamaTest