public function index() { $heads = Head::lists('name', 'id'); $notes = Note::latest('id')->paginate(20); $bizs = Busines::all(); $orgs = Organization::all(); $forumHeads = forumHead::all(); return view('admin.index', compact('notes', 'bizs', 'orgs', 'forumHeads', 'heads')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $notes = Note::latest()->get(); return view('notes.index', compact('notes')); }
public function note() { $notes = Note::latest('created_at')->get(); return view('article.note', compact('notes')); }
}); Route::post('api/todos', function () { return Todo::create(Input::all()); }); // Route::delete('api/todos/{id}',function($id){ // $data = Todo::findOrFail($id); // return Todo::delete($data); // }); /* vuejs */ Route::get('vuejs', function () { return view('vue.index'); }); Route::get('api/notes', function () { return \App\Note::latest()->get(); }); Route::get('vue-dynamic', function () { return view('vue.dynamic'); }); // crud vuejs Route::get('student', function () { return view('students.index'); }); Route::resource('api/students', 'StudentController'); //guestbook vuejs Route::get('gb', function () { return view('guestbook.index'); }); get('api/guestbook', function () { return App\Message::latest()->get();