Файл: app/Policies/UserPolicy.php
Строк: 81
<?php
namespace AppPolicies;
use AppModelsUser;
use IlluminateAuthAccessHandlesAuthorization;
class UserPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @param AppModelsUser $user
* @return IlluminateAuthAccessResponse|bool
*/
public function viewAny(User $user)
{
//
}
/**
* Determine whether the user can view the model.
*
* @param AppModelsUser $user
* @param AppModelsUser $model
* @return IlluminateAuthAccessResponse|bool
*/
public function view(User $user, User $model)
{
//
}
/**
* Determine whether the user can create models.
*
* @param AppModelsUser $user
* @return IlluminateAuthAccessResponse|bool
*/
public function create(User $user)
{
//
}
/**
* Determine whether the user can update the model.
*
* @param AppModelsUser $user
* @param AppModelsUser $model
* @return IlluminateAuthAccessResponse|bool
*/
public function update(User $user, User $model)
{
//
}
/**
* Determine whether the user can delete the model.
*
* @param AppModelsUser $user
* @param AppModelsUser $model
* @return IlluminateAuthAccessResponse|bool
*/
public function delete(User $user, User $model)
{
//
}
/**
* Determine whether the user can restore the model.
*
* @param AppModelsUser $user
* @param AppModelsUser $model
* @return IlluminateAuthAccessResponse|bool
*/
public function restore(User $user, User $model)
{
//
}
/**
* Determine whether the user can permanently delete the model.
*
* @param AppModelsUser $user
* @param AppModelsUser $model
* @return IlluminateAuthAccessResponse|bool
*/
public function forceDelete(User $user, User $model)
{
//
}
/**
* Determine whether the user can use Data Export.
*
* @param User $user
* @return bool
*/
public function dataExport(User $user)
{
return $user->plan->features->data_export;
}
/**
* Determine whether the user can use the API.
*
* @param User $user
* @return bool
*/
public function api(User $user)
{
return $user->plan->features->api;
}
/**
* Determine whether the user can receive Email Reports.
*
* @param User $user
* @return bool
*/
public function emailReports(User $user)
{
return $user->plan->features->email_reports;
}
}