Пример #1
0
 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));
 }
Пример #2
0
 public function feed($id)
 {
     $feeder = Feeder::find($id);
     $newArticles = $feeder->updateFeed();
     return view('admin.article.index')->withArticles(Article::find($newArticles));
 }
Пример #3
0
 /**
  * Get all of the tasks for a given user.
  *
  * @param  User  $user
  * @return Collection
  */
 public function forFeeder(Feeder $feeder)
 {
     return $feeder->places();
 }
Пример #4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return view('admin.feeder.index')->withFeeders(Feeder::all());
 }