app/Http/Requests/UserProfileUpdateRequest.php
/**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
Determine if the user is authorized to make this request.
@return bool
Determine if the user is authorized to make this request . @return bool
public function authorize()
    {
        $user_id = $this->route('profile');
        if(Auth::user()->id!=$user_id){
         return false;
        }
        return true;
    }
public function authorize ( ) { $ user_id = $ this -> route ( 'profile' ) ; if ( Auth :: user ( ) -> id != $ user_id ) { return false ; } return true ; }
Determine if the user is authorized to make this request.
Determine if the user is authorized to make this request .