1. Question: Which of the following is/are valid view calling syntax?

    A
    view("welcome")

    B
    return view("home.welcome")

    C
    return view("welcome")

    D
    return view("home.welcome",["data"=>$data])

    Note: Not available
    1. Report
  2. Question: What is a blade in Laraval?

    A
    A plugin

    B
    A template Engine

    C
    An API

    D
    A Helper

    Note: Not available
    1. Report
  3. Question: Which is the correct syntax to pass multiple variables to the view?

    A
    return view('home')->with('projects',$projects)->with('modules',$modules)

    B
    return view('home')->with(array('projects'=>$projects, 'modules'=>$modules))

    C
    return view('home', array('projects'=>$projects, 'modules'=>$modules))

    D
    return view('home',['projects'=>$projects, 'modules'=>$modules])

    Note: Not available
    1. Report
  4. Question: How can you determine the variable existence in Laravel blade expression?

    A
    {{ if($name)?$name: ’Default Value’ }}

    B
    {{ $name or ‘Default Value’ }}

    C
    {{ isset($name)?$name:’Default Value’}}

    D
    None

    Note: Not available
    1. Report
  5. Question: Which blade engine expression is used to escaping dangerous input?

    A
    {{ … }}

    B
    {{{ … }}}

    C
    {!! … !!}

    D
    {! … !}

    Note: Not available
    1. Report
  6. Question: Which is the correct all possible looping syntax in terms of the laravel blade engine?

    A
    @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

    B
    @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

    C
    @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

    D
    @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

    Note: Not available
    1. Report
  7. Question: Which of the following is correct selection if-elseif-else syntax for laravel blade engine?

    A
    @if (count($records) === 1)
        I have one record!
    @elseif (count($records) > 1)
        I have multiple records!
    @else
        I don't have any records!
    @endif

    B
    @if (count($records) === 1)
        I have one record!
    @elseif (count($records) > 1)
        I have multiple records!
    @else
        I don't have any records!
    @end

    C
    @if count($records) === 1
        I have one record!
    @elseif count($records) > 1
        I have multiple records!
    @else
        I don't have any records!
    @endif

    D
    @if (count($records) === 1)
        I have one record!
    @else
        I don't have any records!
    @endif

    Note: Not available
    1. Report
  8. Question: Which of the following is correct selection switch-case syntax for blade engine?

    A
    @switch($i)
        @case(1)
            First case...
            @break
    
        @case(2)
            Second case...
            @break
    
        @default
            Default case...
    @endswitch

    B
    @switch($i)
        @case(1)
            First case...
            @break
    
        @case(2)
            Second case...
            @break
    
        @default
            Default case...
    @end switch

    C
    @switch($i)
        @case(1)
            First case...
            @break
    
        @case(2)
            Second case...
            @break
    
        @default
            Default case...
    @end

    D
    @switch($i){
        @case(1)
            First case...
            @break
    
        @case(2)
            Second case...
            @break
    
        @default
            Default case...
    }

    Note: Not available
    1. Report
  9. Question: Which is not the correct directive of the laravel blade engine?

    A
    @yield

    B
    @section

    C
    @parent

    D
    @show

    E
    @content

    F
    @include

    Note: Not available
    1. Report
  10. Question: Which function is used to link external CSS files in the blade engine?

    A
    {! HTML::css(‘path’) !}

    B
    {!! HTML::style(‘path’) !!}

    C
    {{ HTML::css(‘path’) }}

    D
    {{ HTML::style(‘path’) }}

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd