I am using laravel full calender package maddhatter/laravel-fullcalendar
. This package is not picking up my theme jquery, bootstrap and moment. I have included all these in master blade and extends in this blade. I if change query and bootstrap then calendar works but all others things which are working on theme jquery and bootstrap stops working.
Including these in master blade:
< link href="app-assets/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" > < script src="app-assets/assets/plugins/jquery/jquery.min.js"></script > < script src="app-assets/assets/plugins/moment/moment.js"></script >
It shows me console error that
Uncaught ReferenceError: jQuery is not defined
Uncaught ReferenceError: $ is not defined
Blade:
@extends('layouts.master')
@section('content')
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.css"/>
<div class="row">
<div class="col-md-12 ">
<div class="panel panel-default">
<div class="panel-heading">Full Calendar Example</div>
<div class="panel-body">
{!! $calendar->calendar() !!}
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"></script>
{!! $calendar->script() !!}
@endsection
My Controller:
public function weddingHallDashboardView()
{
$events = [];
$data = Booking::all();
if($data->count()) {
foreach ($data as $key => $value) {
$events[] = Calendar::event(
$value->booking_type,
true,
new \DateTime($value->date_from),
new \DateTime($value->date_to),
null,
// Add color and link on event
[
'color' => '#f05050',
'url' => 'pass here url and any route',
]
);
}
}
$calendar = Calendar::addEvents($events);
return view('dashboards.wedding-hall-dashboard')
->with(['calendar' => $calendar]);
}
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2GwH1cG
via IFTTT
Aucun commentaire:
Enregistrer un commentaire