public function store(Request $request) { $this->validate($request, ['tag' => 'required|max:80']); $interest = $request->all(); Interest::create($interest); return redirect('admin/dashboard/interest'); }
/** * Run the database seeds. * * @return void */ public function run() { Interest::create(['name' => 'PHP']); Interest::create(['name' => 'Laravel']); Interest::create(['name' => 'Sass']); Interest::create(['name' => 'Ruby on Rails']); }
public function interest() { DB::beginTransaction(); Interest::create(['res' => Input::get('id'), 'wanderer' => Session::get(MateMiddleware::$VERIFY)]); DB::commit(); return 'recorded'; }
public function run() { DB::table('interests')->delete(); Interest::create(['id' => '1', 'interest' => 'Arts and culture', 'short_name' => 'arts']); Interest::create(['id' => '2', 'interest' => 'Disasters', 'short_name' => 'disasters']); Interest::create(['id' => '3', 'interest' => 'Education', 'short_name' => 'education']); Interest::create(['id' => '4', 'interest' => 'Environment and nature', 'short_name' => 'environment']); Interest::create(['id' => '5', 'interest' => 'Health', 'short_name' => 'health']); Interest::create(['id' => '6', 'interest' => 'Lifestyle and consumerism', 'short_name' => 'lifestyle']); Interest::create(['id' => '7', 'interest' => 'The Media', 'short_name' => 'media']); Interest::create(['id' => '8', 'interest' => 'National holidays, festivals, anniversaries, annual events', 'short_name' => 'holidays']); Interest::create(['id' => '9', 'interest' => 'Politics and economics', 'short_name' => 'politics']); Interest::create(['id' => '10', 'interest' => 'Religion and belief', 'short_name' => 'religion']); Interest::create(['id' => '11', 'interest' => 'Society and social issues', 'short_name' => 'society']); Interest::create(['id' => '12', 'interest' => 'Transportation, science and technology', 'short_name' => 'transportation']); Interest::create(['id' => '13', 'interest' => 'Wars and conflict', 'short_name' => 'wars']); Interest::create(['id' => '14', 'interest' => 'Work and production', 'short_name' => 'work']); }