예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $data = Request::except('_token');
     $scaffold = new Scaffold($data);
     $scaffold->Migration();
     $scaffold->Model();
     $scaffold->Views();
     $scaffold->Controller();
     $scaffold->Route();
     $scaffoldInterface = new Scaffoldinterface();
     $scaffoldInterface->migration = $scaffold->paths->MigrationPath();
     $scaffoldInterface->model = $scaffold->paths->ModelPath();
     $scaffoldInterface->controller = $scaffold->paths->ControllerPath();
     $scaffoldInterface->views = $scaffold->paths->DirPath();
     $scaffoldInterface->tablename = $scaffold->names->TableNames();
     $scaffoldInterface->save();
     Session::flash('status', ' Successfully created ' . $scaffold->names->TableName() . '. To complete your scaffold. go ahead and migrate the schema.');
     return redirect('scaffold');
 }
예제 #2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $data = Request::except('_token');
     $object = new Scaffold($data);
     $object->Migration();
     $object->Model();
     $object->Views();
     $object->Controller();
     $object->Route();
     $scaffold = new Scaffoldinterface();
     $scaffold->migration = $object->paths->MigrationPath();
     $scaffold->model = $object->paths->ModelPath();
     $scaffold->controller = $object->paths->ControllerPath();
     $scaffold->views = $object->paths->DirPath();
     $scaffold->tablename = $object->names->TableName();
     $scaffold->save();
     Session::flash('status', $object->names->TableName() . ' Created successfuly To complete your scaffold. you must add to your terminal $: php artisan migrate');
     return redirect('scaffold');
 }