app->bind('Illuminate\Contracts\Auth\Registrar'); } public function boot() { // Please note the different namespace // and please add a \ in front of your classes in the global namespace \Event::listen('cron.collectJobs', function () { \Cron::add('example1', '* * * * *', function () { $this->index(); return 'No'; }); \Cron::add('example2', '*/2 * * * *', function () { // Do some crazy things successfully every two minute }); \Cron::add('disabled job', '0 * * * *', function () { // Do some crazy things successfully every hour }, false); }); $this->composer(); } public function composer() { \View::composer('themes.default1.update.notification', function () { $notification = new BarNotification(); $not = [ 'notification' => $notification->where('value','!=','')->get(), ]; view()->share($not); }); } }