• Developer New

    Friday, March 24, 2017

    how to create Blade Templates in laravel

    @extends('layout.name')
    // Begin a section@section('name')
    // End a section@stop
    // End a section and yield@show
    // Section with inline content@section('name', '<h1>Foo</h1>')
    @parent
    // Show a section in a template@yield('name')
    @include('view.name')
    @include('view.name', ['key' => 'value']);
    @lang('messages.name')
    @choice('messages.name', 1);
    @if
    @else
    @elseif
    @endif
    @unless
    @endunless
    @for
    @endfor
    @foreach
    @endforeach
    @while
    @endwhile
    // Echo content{{ $var }}
    // Echo escaped content{{{ $var }}}
    {{-- Blade Comment --}}
    // Echoing Data After Checking For Existence{{{ $name or 'Default' }}}
    // Displaying Raw Text With Curly Braces@{{ This will not be processed by Blade }}

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel