app/Http/Controllers/DocController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $user = auth()->user();
        date_default_timezone_set("Asia/Taipei");
        Carbon::setLocale('zh-TW');
        return View::make('docs.index')
            ->with('docs',$user->docs->sortByDesc('created_at'));
    }
public function index ( ) { $ user = auth ( ) -> user ( ) ; date_default_timezone_set ( " Asia/Taipei " ) ; Carbon :: setLocale ( 'zh-TW' ) ; return View :: make ( 'docs.index' ) -> with ( 'docs' , $ user -> docs -> sortByDesc ( 'created_at' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .