mardi 26 avril 2016

how to put routing and pages together

I am pretty new to Laravel, I am so confused on how to start this. but basically I have a switch statement with different display mode cases and what I am trying to do is to connect routing with blade. How do I display $mycontent in blade based on cases like these ? Thanks

switch(MyPage::$some_display_mode) {

case 'normal':
 $mycontent //this is what I want to display in blade

case 'ajax':


case 'other'
}

I want to connect these cases normal,ajax ,other etc with with different MyPages that I have so that I can display my blade files something like this

<html>
@yield('content)
</html>


@section('content')
whatever comes from the pages
@endsection



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire