Skip to content

Instantly share code, notes, and snippets.

View KunalGautam's full-sized avatar

Kunal Gautam KunalGautam

View GitHub Profile
<?php
Route::get('/', function () {
return "Hello World!";
});
<?php
Route::get('/', function () {
return view('index');
});
return view('somefolder.somesubfolder.somefile');
<?php
echo date('l jS \of F Y h:i:s A');
?>
@php
echo date('l jS \of F Y h:i:s A');
@endphp
@for ($i = 0; $i < 10; $i++)
The current value is {{ $i }}
@endfor
@foreach ($users as $user)
This is user {{ $user->id }}
@endforeac
@while (true)
I'm looping forever.
@endwhile
@if(empty($var))
It is empty
@else
It is not empty
@endif
@if($var1==$var2)
It is equal
@else
It is not equal
@endif