You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I use __set($key) in my controller and use Dingo\Api\Routing\Helpers to return Data;
The system return me "Call to a member function collection() on null"
Code
class Controller extends BaseController
{
use Helpers;
public function __set($key)
{
if($key == 'auth_user'){
return Request::user();
}
return $key;
}
public function index(){
$list = User::all();
return $this->response->collection($list, NotifyTransformer::class);
}
}
The text was updated successfully, but these errors were encountered:
Actual Behaviour
when I use __set($key) in my controller and use Dingo\Api\Routing\Helpers to return Data;
The system return me "Call to a member function collection() on null"
Code
class Controller extends BaseController
{
public function __set($key)
{
if($key == 'auth_user'){
return Request::user();
}
return $key;
}
public function index(){
$list = User::all();
return $this->response->collection($list, NotifyTransformer::class);
}
}
The text was updated successfully, but these errors were encountered: