for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Containers\User\UI\API\Requests;
use Illuminate\Contracts\Auth\Access\Gate;
use App\Containers\User\Models\User;
use App\Port\Request\Abstracts\Request;
/**
* Class DeleteUserRequest.
*
* @author Mahmoud Zalt <[email protected]>
*/
class DeleteUserRequest extends Request
{
* Get the validation rules that apply to the request.
* @return array
public function rules()
return [
];
}
* Determine if the user is authorized to make this request.
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
* @return bool
public function authorize(Gate $gate, GetAuthenticatedUserTask $getAuthenticatedUserTask)
return $gate->getPolicyFor(User::class)->update($this->user(), $getAuthenticatedUserTask->run()->id);
getPolicyFor()
Illuminate\Contracts\Auth\Access\Gate
policy()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.