예제 #1
0
 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"));
 }
예제 #2
0
 public function pullNews($mp_id)
 {
     $mp = MediaPlatform::find($mp_id);
     $mp->pullNewsFromRemote();
     echo json_encode(['code' => 0]);
 }
예제 #3
0
 public static function createMP($mp)
 {
     $result = MediaPlatform::create($mp);
     $mp_id = $result['id'];
     return $mp_id;
 }