Question: Which of the following is/are valid view calling syntax?
A
B
C
D
view("welcome")
B
return view("home.welcome")
C
return view("welcome")
D
return view("home.welcome",["data"=>$data])
Note: Not available
@for ($i = 0; $i < 10; $i++) The current value is {{ $i }} @endfor @foreach ($users as $user) <p>This is user {{ $user->id }}</p> @endforeach @forelse ($users as $user) <li>{{ $user->name }}</li> @empty <p>No users</p> @endforelse @while (true) <p>I'm looping forever.</p> @endwhile
@for ($i = 0; $i < 10; $i++) The current value is {{ $i }} @endfor @foreach ($users as $user){ <p>This is user {{ $user->id }}</p> }@endforeach @forelse ($users as $user) <li>{{ $user->name }}</li> @empty <p>No users</p> @endforelse @while (true){ <p>I'm looping forever.</p> }@endwhile
@for ($i = 0; $i < 10; $i++) The current value is {{ $i }} @endfor @foreach ($users as $user) <p>This is user {{ $user->id }}</p> @endforeach @while (true) <p>I'm looping forever.</p> @endwhile
@for ($i = 0; $i < 10; $i++) The current value is {{ $i }} @endfor @foreach ($users as $user) <p>This is user {{ $user->id }}</p> @endforeach @forelse ($users as $user) <li>{{ $user->name }}</li> @empty <p>No users</p> @endforelse
@if (count($records) === 1) I have one record! @elseif (count($records) > 1) I have multiple records! @else I don't have any records! @endif
@if (count($records) === 1) I have one record! @elseif (count($records) > 1) I have multiple records! @else I don't have any records! @end
@if count($records) === 1 I have one record! @elseif count($records) > 1 I have multiple records! @else I don't have any records! @endif
@if (count($records) === 1) I have one record! @else I don't have any records! @endif
@switch($i) @case(1) First case... @break @case(2) Second case... @break @default Default case... @endswitch
@switch($i) @case(1) First case... @break @case(2) Second case... @break @default Default case... @end switch
@switch($i) @case(1) First case... @break @case(2) Second case... @break @default Default case... @end
@switch($i){ @case(1) First case... @break @case(2) Second case... @break @default Default case... }