public function editNews($mp_id, $news_id) { $mp = MediaPlatform::find($mp_id); $news = $mp->getNews($news_id)[$news_id]; //dd($news); return view("news_edit", compact("mp", "news")); }
public function pullNews($mp_id) { $mp = MediaPlatform::find($mp_id); $mp->pullNewsFromRemote(); echo json_encode(['code' => 0]); }
public static function createMP($mp) { $result = MediaPlatform::create($mp); $mp_id = $result['id']; return $mp_id; }