<?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::get('test', function () { // dd(App\User::whereId(1)); dd(App\User::increment('notice_count')); $user = auth()->user(); dd($user->notifications->toArray()); return view('welcome'); }); Route::get('/', 'ArticleController@index'); Route::resource('article', 'ArticleController', ['except' => ['index', 'create']]); Route::get('articles/create', 'ArticleController@create'); Route::get('articles/view/{id}', 'ArticleController@view'); Route::post('articles/active', 'ArticleController@active'); Route::post('articles/like', 'ArticleController@like'); Route::post('articles/opt', 'ArticleController@restoreOrDelete'); Route::post('articles/collect', 'ArticleController@collect'); Route::post('articles/upload', 'ArticleController@upload'); Route::get('articles/user/{user_id}', 'ArticleController@forUser'); Route::get('articles', 'ArticleController@index'); Route::controllers(['auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController']);