예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(ArtistRequest $request)
 {
     if (Gate::denies('admin')) {
         abort(403);
     }
     $artist = Artist::create($request->all());
     return redirect()->route('artist.show', ['artist' => $artist->id])->with('alert-success', [trans('htmusic.saved')]);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     if (Auth::check()) {
         \App\Artist::create(\Input::all());
         return redirect('artists');
     } else {
         return redirect(url());
     }
 }
예제 #3
0
 public function store(Request $request)
 {
     $input = $request->all();
     $artist = Artist::create(['name' => $input['name'], 'type' => $input['type'], 'website' => $input['website'], 'education' => $input['education'], 'description' => $input['description']]);
     return redirect('artist');
 }
예제 #4
0
 /**
  * @param $id
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function translate($id)
 {
     $article = Artist::findOrfail($id);
     $new_article = Artist::create(array_except($article->toArray(), ['id', 'lang']) + ['lang' => '']);
     flash()->success(trans('all.trans_item_created'));
     return redirect(action('Admin\\ArtistsController@edit', $new_article->id));
 }
예제 #5
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     \App\Artist::create(\Input::all());
     return redirect('artists');
 }