현재 프로젝트를 얻을 존재하지 않습니다BadMethodCallException 방법 웅변은 LARAVEL에서이 오류를
class Actividades extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'actividades';
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = array('password', 'remember_token');
}
내 controller.php (ApiActividadesController.php는)
class ApiActividadesController extends BaseController {
public $restful = true;
public function get_index($id = null)
{
if (is_null($id))
{
return Response::eloquent(Actividades::all());
}
else
{
$actividades = Actividades::find($id);
if(is_null($actividades)){
return Response::json('Actividades not found', 404);
} else {
return Response::eloquent($actividades);
}
}
}
오류가 나는 전체 프로젝트, 민감한 사용 사례를 다시하려고 한 return Response::eloquent(Actividades::all());
에 던졌습니다 그러나 방법 "laravel"은 apear 것으로 보이지 않습니다.
도움이 필요합니다.
'Response :: eloquent()'와 같은 것은 존재하지 않습니다. – lukasgeiter
API를 통해 테이블 "actividades"@lukasgeiter의 모든 요소를 반환합니다. – Ratiess
'Response :: json (Actividades :: all()) '을 찾고 계십니까? – lukasgeiter