/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Events::destroy($id); \Toastr::error('You have deleted that event', $title = 'Deleted', ["showDuration" => "3000"]); return redirect('events'); }
Route::get('tasks/{task}/completed/{completed}', 'TasksController@completed'); Route::get('staff', function () { return \NodenDb\User::all(); }); Route::group(['prefix' => 'calender'], function () { Route::get('/jobs', function () { return Jobs::active()->get()->values(); }); Route::get('/tasks', function () { return Tasks::where('task_user_id', auth()->id())->orWhere('Scope', 'Everyone')->todo()->get()->values(); }); Route::get('/events/public', function () { return Events::recent()->pub()->get()->values(); }); Route::get('/events/private', function () { return Events::recent()->pri()->get()->values(); }); }); Route::group(['prefix' => 'messages'], function () { Route::get('/', ['as' => 'messages', 'uses' => 'MessagesController@index']); Route::get('create', ['as' => 'messages.create', 'uses' => 'MessagesController@create']); Route::post('/', ['as' => 'messages.store', 'uses' => 'MessagesController@store']); Route::get('{id}', ['as' => 'messages.show', 'uses' => 'MessagesController@show']); Route::put('{id}', ['as' => 'messages.update', 'uses' => 'MessagesController@update']); Route::post('multi', ['as' => 'messages.multi', 'uses' => 'MessagesController@multi']); }); Route::group(['prefix' => 'datatables'], function () { Route::get('/parts', ['as' => 'datatables.parts', 'uses' => 'PartsController@anyData']); Route::get('/services', ['as' => 'datatables.services', 'uses' => 'ServicesController@anyData']); Route::get('/customers', ['as' => 'datatables.customers', 'uses' => 'CustomersController@anyData']); Route::get('/jobs', ['as' => 'datatables.jobs', 'uses' => 'JobsController@anyData']);