CSS plays an important role in every project. In Laravel 4.x we will define our css in:
public/css/custom.css
Here In above path we will define our css in laravel 4.x
To call a view from controller we will use the code as follow:
Example:
return View::make('karmaMeetings',array('pageTitle' => 'Meeting | KarmaCircles','CurrentUser' => $CurrentUser,'GiverInMeeting'=>$GiverInMeeting,
'ReceiverInMeeting'=>$ReceiverInMeeting,'countRec'=>'0','countArc'=>'0','countSent'=>'0', 'totalReceivedRequest'=>$totalReceivedRequest));
}
Here We can see View::make we will call the view and karmaMeetings is our view blade file.
We will define our css in the layout which we will make in views folder.
Path of Layout:
app/views/common/site.blade.php
And We will define css like below
{{ HTML::style('css/font.css') }}
{{ HTML::style('css/bootstrap.css') }}
{{ HTML::style('css/custom.css') }}
{{ HTML::style('css/media.css') }}
{{ HTML::style('css/bootstrap-datetimepicker.min.css') }}
By this way we will define css and call a view from controller.
0 Comment(s)