public function run() { $feeder = Feeder::all()->first(); $feederId = $feeder->id; DB::table('articles')->delete(); Article::create(array('title' => 'Milano. La stella e le emozioni sono solo Innocenti Evasioni', 'url' => 'http://www.scattidigusto.it/2016/02/12/ristoranti-milano-innocenti-evasioni/', 'feeder_id' => $feederId)); }
public function feed($id) { $feeder = Feeder::find($id); $newArticles = $feeder->updateFeed(); return view('admin.article.index')->withArticles(Article::find($newArticles)); }
/** * Get all of the tasks for a given user. * * @param User $user * @return Collection */ public function forFeeder(Feeder $feeder) { return $feeder->places(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return view('admin.feeder.index')->withFeeders(Feeder::all()); }