-
Notifications
You must be signed in to change notification settings - Fork 2
2.3 Blade: Example How Tos
Lucas F. Lu edited this page Jan 29, 2020
·
3 revisions
- Create a file "/resources/views/homepage.blade.php" with the following contents.
@extends('felaraframe::page')
@section('content')
Home page contents goes here...
@endsection
- Route to the controller.
under /app/Http/Controllers/MyHomePage.php
...
public function displayHomePage(){
return view('homepage');
}
...
under /routes/web.php
...
Route::get('homepage','MyHomePage@displayHomePage');
...
/resources/views/homepage.blade.php
@section('content')
Home page contents goes here...
<div class="col-md-4">
@fefileupload(['formID'=>'myFileUploader'])
@endfefileupload
</div>
@endsection
/resources/views/homepage.blade.php
@push('footerscripts')
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
@endpush
/resources/views/homepage.blade.php
@section('sidebar_alt')
@fenotes(['active'=>true])
@endfenotes
@endsection
Feedback is much appreciated! I can be reached at [email protected]