public function authorize()
{
$user = $this->user;
$project = $this->project;
$project_access = $user->project_access->where('project_id', $project->id)->first();
return $project_access !== null;
}
public function rules()
{
return [];
}
protected function credentials(Request $request)
{
//return $request->only($this->username(), 'password'); что было до
return ['email' => $request->{$this->username()}, 'password' => $request->password, 'activated' => 1];
}
Если не секрет - что за проект?