コード例 #1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $count = TextContact::select('id')->count();
     if ($count >= 1) {
         return $this->show();
     } else {
         $user_id = Auth::user()->id;
         $user_role = User::findOrfail($user_id);
         return view('admin.text.contact.create', compact('user_role'));
     }
 }