public function destroy($muffin_id)
 {
     try {
         /** @var Muffin $target */
         $target = Muffin::findOrFail($muffin_id);
     } catch (\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
         return $this->respondNotFound();
     }
     $data = ['deleted' => $target->delete()];
     return $this->respondOk($data);
 }
コード例 #2
0
 public function buildUrl($url = array())
 {
     if (isset($url['admin'])) {
         unset($url['admin']);
     }
     return Muffin::buildMetaUrl($url);
 }