app/Http/Controllers/TareaController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create($id=null)
    {
      if (!Auth::user()->can('crear_tareas')) {
          return redirect("/home");
      }
      if (!is_null($id) && is_numeric($id)) {
        $area = Area::findOrFail($id);
        return view('admin.tareas.crear_tarea')->with('area',$area);
      }
      return view('admin.tareas.crear_tarea')->with('area',0);
    }
public function create ( $ id = null ) { if ( ! Auth :: user ( ) -> can ( 'crear_tareas' ) ) { return redirect ( " /home " ) ; } if ( ! is_null ( $ id ) && is_numeric ( $ id ) ) { $ area = Area :: findOrFail ( $ id ) ; return view ( 'admin.tareas.crear_tarea' ) -> with ( 'area' , $ area ) ; } return view ( 'admin.tareas.crear_tarea' ) -> with ( 'area' , 0 ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .