/** * Store a newly created resource in storage. * * @param Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $this->validate($request, ['name' => 'required']); Location::create(['name' => $request['name'], 'description' => $request['description']]); flash()->success('Success!', "New fishing location has been created!"); return redirect(route('admin.settings.fishing.locations.index')); }
/** * Run the database seeds. * * @return void */ public function run() { Location::create(['name' => 'Unknown', 'description' => 'Unknown location description.']); Location::create(['name' => 'Charter', 'description' => 'Charter location description.']); Location::create(['name' => 'Dart', 'description' => 'Dart location description.']); Location::create(['name' => 'Exe', 'description' => 'Exe location description.']); Location::create(['name' => 'Local', 'description' => 'Local location description.']); Location::create(['name' => 'Start', 'description' => 'Start location description.']); Location::create(['name' => 'Teign', 'description' => 'Teign location description.']); }