mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Static analysis
This commit is contained in:
parent
7f5ffe9f73
commit
42c486e4c3
@ -303,7 +303,10 @@ class ClientGatewayTokenController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateClientGatewayTokenRequest $request)
|
public function create(CreateClientGatewayTokenRequest $request)
|
||||||
{
|
{
|
||||||
$client_gateway_token = ClientGatewayTokenFactory::create(auth()->user()->company()->id);
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$client_gateway_token = ClientGatewayTokenFactory::create($user->company()->id);
|
||||||
|
|
||||||
$client_gateway_token = $this->client_gateway_token_repo->save($request->all(), $client_gateway_token);
|
$client_gateway_token = $this->client_gateway_token_repo->save($request->all(), $client_gateway_token);
|
||||||
|
|
||||||
@ -350,7 +353,11 @@ class ClientGatewayTokenController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function store(StoreClientGatewayTokenRequest $request)
|
public function store(StoreClientGatewayTokenRequest $request)
|
||||||
{
|
{
|
||||||
$client_gateway_token = ClientGatewayTokenFactory::create(auth()->user()->company()->id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$client_gateway_token = ClientGatewayTokenFactory::create($user->company()->id);
|
||||||
|
|
||||||
$client_gateway_token = $this->client_gateway_token_repo->save($request->all(), $client_gateway_token);
|
$client_gateway_token = $this->client_gateway_token_repo->save($request->all(), $client_gateway_token);
|
||||||
|
|
||||||
|
@ -149,7 +149,11 @@ class CompanyGatewayController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateCompanyGatewayRequest $request)
|
public function create(CreateCompanyGatewayRequest $request)
|
||||||
{
|
{
|
||||||
$company_gateway = CompanyGatewayFactory::create(auth()->user()->company()->id, auth()->user()->id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$company_gateway = CompanyGatewayFactory::create($user->company()->id, auth()->user()->id);
|
||||||
|
|
||||||
return $this->itemResponse($company_gateway);
|
return $this->itemResponse($company_gateway);
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,11 @@ class CompanyLedgerController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index(ShowCompanyLedgerRequest $request)
|
public function index(ShowCompanyLedgerRequest $request)
|
||||||
{
|
{
|
||||||
$company_ledger = CompanyLedger::where('company_id', auth()->user()->company()->id)->orderBy('id', 'ASC');
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$company_ledger = CompanyLedger::where('company_id', $user->company()->id)->orderBy('id', 'ASC');
|
||||||
|
|
||||||
return $this->listResponse($company_ledger);
|
return $this->listResponse($company_ledger);
|
||||||
}
|
}
|
||||||
|
@ -121,9 +121,13 @@ class ConnectedAccountController extends BaseController
|
|||||||
'email_verified_at' => now()
|
'email_verified_at' => now()
|
||||||
];
|
];
|
||||||
|
|
||||||
auth()->user()->update($connected_account);
|
|
||||||
auth()->user()->email_verified_at = now();
|
/** @var \App\Models\User $user */
|
||||||
auth()->user()->save();
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$user->update($connected_account);
|
||||||
|
$user->email_verified_at = now();
|
||||||
|
$user->save();
|
||||||
|
|
||||||
$this->setLoginCache(auth()->user());
|
$this->setLoginCache(auth()->user());
|
||||||
|
|
||||||
|
@ -128,7 +128,11 @@ class ExpenseCategoryController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateExpenseCategoryRequest $request)
|
public function create(CreateExpenseCategoryRequest $request)
|
||||||
{
|
{
|
||||||
$expense_category = ExpenseCategoryFactory::create(auth()->user()->company()->id, auth()->user()->id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$expense_category = ExpenseCategoryFactory::create($user->company()->id, auth()->user()->id);
|
||||||
|
|
||||||
return $this->itemResponse($expense_category);
|
return $this->itemResponse($expense_category);
|
||||||
}
|
}
|
||||||
|
@ -514,8 +514,6 @@ class InvoiceController extends BaseController
|
|||||||
if ($action == 'bulk_download' && $invoices->count() > 1) {
|
if ($action == 'bulk_download' && $invoices->count() > 1) {
|
||||||
$invoices->each(function ($invoice) use ($user) {
|
$invoices->each(function ($invoice) use ($user) {
|
||||||
if ($user->cannot('view', $invoice)) {
|
if ($user->cannot('view', $invoice)) {
|
||||||
nlog('access denied');
|
|
||||||
|
|
||||||
return response()->json(['message' => ctrans('text.access_denied')]);
|
return response()->json(['message' => ctrans('text.access_denied')]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -570,7 +568,7 @@ class InvoiceController extends BaseController
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return $this->listResponse(Invoice::query()->withTrashed()->whereIn('id', $this->transformKeys($ids))->company());
|
return $this->listResponse(Invoice::withTrashed()->whereIn('id', $this->transformKeys($ids))->company());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -584,7 +582,7 @@ class InvoiceController extends BaseController
|
|||||||
|
|
||||||
/* Need to understand which permission are required for the given bulk action ie. view / edit */
|
/* Need to understand which permission are required for the given bulk action ie. view / edit */
|
||||||
|
|
||||||
return $this->listResponse(Invoice::query()->withTrashed()->whereIn('id', $this->transformKeys($ids))->company());
|
return $this->listResponse(Invoice::withTrashed()->whereIn('id', $this->transformKeys($ids))->company());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -305,7 +305,7 @@ class MigrationController extends BaseController
|
|||||||
$fresh_company = false;
|
$fresh_company = false;
|
||||||
|
|
||||||
// Look for possible existing company (based on company keys).
|
// Look for possible existing company (based on company keys).
|
||||||
$existing_company = Company::whereRaw('BINARY `company_key` = ?', [$company['company_key']])->first();
|
$existing_company = Company::query()->whereRaw('BINARY `company_key` = ?', [$company['company_key']])->first();
|
||||||
|
|
||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
$t = app('translator');
|
$t = app('translator');
|
||||||
@ -386,6 +386,7 @@ class MigrationController extends BaseController
|
|||||||
$fresh_company_token->is_system = true;
|
$fresh_company_token->is_system = true;
|
||||||
$fresh_company_token->save();
|
$fresh_company_token->save();
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
$user->companies()->attach($fresh_company->id, [
|
$user->companies()->attach($fresh_company->id, [
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'is_owner' => 1,
|
'is_owner' => 1,
|
||||||
@ -417,6 +418,7 @@ class MigrationController extends BaseController
|
|||||||
|
|
||||||
$fresh_company_token->save();
|
$fresh_company_token->save();
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
$user->companies()->attach($fresh_company->id, [
|
$user->companies()->attach($fresh_company->id, [
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'is_owner' => 1,
|
'is_owner' => 1,
|
||||||
|
@ -40,9 +40,13 @@ class PingController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
return response()->json(
|
return response()->json(
|
||||||
['company_name' => auth()->user()->getCompany()->present()->name(),
|
['company_name' => $user->getCompany()->present()->name(),
|
||||||
'user_name' => auth()->user()->present()->name(),
|
'user_name' => $user->present()->name(),
|
||||||
],
|
],
|
||||||
200
|
200
|
||||||
);
|
);
|
||||||
|
@ -132,7 +132,11 @@ class ProductController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateProductRequest $request)
|
public function create(CreateProductRequest $request)
|
||||||
{
|
{
|
||||||
$product = ProductFactory::create(auth()->user()->company()->id, auth()->user()->id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$product = ProductFactory::create($user->company()->id, auth()->user()->id);
|
||||||
|
|
||||||
return $this->itemResponse($product);
|
return $this->itemResponse($product);
|
||||||
}
|
}
|
||||||
@ -177,7 +181,11 @@ class ProductController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function store(StoreProductRequest $request)
|
public function store(StoreProductRequest $request)
|
||||||
{
|
{
|
||||||
$product = $this->product_repo->save($request->all(), ProductFactory::create(auth()->user()->company()->id, auth()->user()->id));
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$product = $this->product_repo->save($request->all(), ProductFactory::create($user->company()->id, auth()->user()->id));
|
||||||
|
|
||||||
return $this->itemResponse($product);
|
return $this->itemResponse($product);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,10 @@ class SystemLogController extends BaseController
|
|||||||
{
|
{
|
||||||
$system_logs = SystemLog::filter($filters);
|
$system_logs = SystemLog::filter($filters);
|
||||||
|
|
||||||
if (auth()->user()->isAdmin()) {
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
if ($user->isAdmin()) {
|
||||||
return $this->listResponse($system_logs);
|
return $this->listResponse($system_logs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,14 +45,20 @@ class TaskSchedulerController extends BaseController
|
|||||||
|
|
||||||
public function create(CreateSchedulerRequest $request)
|
public function create(CreateSchedulerRequest $request)
|
||||||
{
|
{
|
||||||
$scheduler = SchedulerFactory::create(auth()->user()->company()->id, auth()->user()->id);
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$scheduler = SchedulerFactory::create($user->company()->id, auth()->user()->id);
|
||||||
|
|
||||||
return $this->itemResponse($scheduler);
|
return $this->itemResponse($scheduler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(StoreSchedulerRequest $request)
|
public function store(StoreSchedulerRequest $request)
|
||||||
{
|
{
|
||||||
$scheduler = $this->scheduler_repository->save($request->all(), SchedulerFactory::create(auth()->user()->company()->id, auth()->user()->id));
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$scheduler = $this->scheduler_repository->save($request->all(), SchedulerFactory::create($user->company()->id, auth()->user()->id));
|
||||||
|
|
||||||
return $this->itemResponse($scheduler);
|
return $this->itemResponse($scheduler);
|
||||||
}
|
}
|
||||||
@ -79,6 +85,10 @@ class TaskSchedulerController extends BaseController
|
|||||||
|
|
||||||
public function bulk()
|
public function bulk()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
$action = request()->input('action');
|
$action = request()->input('action');
|
||||||
|
|
||||||
if (!in_array($action, ['archive', 'restore', 'delete'])) {
|
if (!in_array($action, ['archive', 'restore', 'delete'])) {
|
||||||
@ -89,8 +99,8 @@ class TaskSchedulerController extends BaseController
|
|||||||
|
|
||||||
$task_schedulers = Scheduler::withTrashed()->find($this->transformKeys($ids));
|
$task_schedulers = Scheduler::withTrashed()->find($this->transformKeys($ids));
|
||||||
|
|
||||||
$task_schedulers->each(function ($task_scheduler, $key) use ($action) {
|
$task_schedulers->each(function ($task_scheduler, $key) use ($action, $user) {
|
||||||
if (auth()->user()->can('edit', $task_scheduler)) {
|
if ($user->can('edit', $task_scheduler)) {
|
||||||
$this->scheduler_repository->{$action}($task_scheduler);
|
$this->scheduler_repository->{$action}($task_scheduler);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -311,7 +311,11 @@ class TokenController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateTokenRequest $request)
|
public function create(CreateTokenRequest $request)
|
||||||
{
|
{
|
||||||
$token = CompanyTokenFactory::create(auth()->user()->company()->id, auth()->user()->id, auth()->user()->account_id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$token = CompanyTokenFactory::create($user->company()->id, auth()->user()->id, auth()->user()->account_id);
|
||||||
|
|
||||||
return $this->itemResponse($token);
|
return $this->itemResponse($token);
|
||||||
}
|
}
|
||||||
@ -356,7 +360,11 @@ class TokenController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function store(StoreTokenRequest $request)
|
public function store(StoreTokenRequest $request)
|
||||||
{
|
{
|
||||||
$company_token = CompanyTokenFactory::create(auth()->user()->company()->id, auth()->user()->id, auth()->user()->account_id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$company_token = CompanyTokenFactory::create($user->company()->id, auth()->user()->id, auth()->user()->account_id);
|
||||||
|
|
||||||
$token = $this->token_repo->save($request->all(), $company_token);
|
$token = $this->token_repo->save($request->all(), $company_token);
|
||||||
|
|
||||||
@ -476,13 +484,16 @@ class TokenController extends BaseController
|
|||||||
{
|
{
|
||||||
$this->entity_transformer = CompanyTokenHashedTransformer::class;
|
$this->entity_transformer = CompanyTokenHashedTransformer::class;
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
$action = request()->input('action');
|
$action = request()->input('action');
|
||||||
|
|
||||||
$ids = request()->input('ids');
|
$ids = request()->input('ids');
|
||||||
$tokens = CompanyToken::withTrashed()->find($this->transformKeys($ids));
|
$tokens = CompanyToken::withTrashed()->find($this->transformKeys($ids));
|
||||||
|
|
||||||
$tokens->each(function ($token, $key) use ($action) {
|
$tokens->each(function ($token, $key) use ($action, $user) {
|
||||||
if (auth()->user()->can('edit', $token)) {
|
if ($user->can('edit', $token)) {
|
||||||
$this->token_repo->{$action}($token);
|
$this->token_repo->{$action}($token);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -59,7 +59,9 @@ class TwoFactorController extends BaseController
|
|||||||
{
|
{
|
||||||
$google2fa = new Google2FA();
|
$google2fa = new Google2FA();
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
|
||||||
$secret = $request->input('secret');
|
$secret = $request->input('secret');
|
||||||
$oneTimePassword = $request->input('one_time_password');
|
$oneTimePassword = $request->input('one_time_password');
|
||||||
|
|
||||||
@ -82,7 +84,10 @@ class TwoFactorController extends BaseController
|
|||||||
|
|
||||||
public function disableTwoFactor()
|
public function disableTwoFactor()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
|
||||||
$user->google_2fa_secret = null;
|
$user->google_2fa_secret = null;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
@ -320,7 +320,11 @@ class VendorController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create(CreateVendorRequest $request)
|
public function create(CreateVendorRequest $request)
|
||||||
{
|
{
|
||||||
$vendor = VendorFactory::create(auth()->user()->company()->id, auth()->user()->id);
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$vendor = VendorFactory::create($user->company()->id, auth()->user()->id);
|
||||||
|
|
||||||
return $this->itemResponse($vendor);
|
return $this->itemResponse($vendor);
|
||||||
}
|
}
|
||||||
@ -365,7 +369,11 @@ class VendorController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function store(StoreVendorRequest $request)
|
public function store(StoreVendorRequest $request)
|
||||||
{
|
{
|
||||||
$vendor = $this->vendor_repo->save($request->all(), VendorFactory::create(auth()->user()->company()->id, auth()->user()->id));
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$vendor = $this->vendor_repo->save($request->all(), VendorFactory::create($user->company()->id, auth()->user()->id));
|
||||||
|
|
||||||
$vendor->load('contacts', 'primary_contact');
|
$vendor->load('contacts', 'primary_contact');
|
||||||
|
|
||||||
@ -492,8 +500,11 @@ class VendorController extends BaseController
|
|||||||
$ids = request()->input('ids');
|
$ids = request()->input('ids');
|
||||||
$vendors = Vendor::withTrashed()->find($this->transformKeys($ids));
|
$vendors = Vendor::withTrashed()->find($this->transformKeys($ids));
|
||||||
|
|
||||||
$vendors->each(function ($vendor, $key) use ($action) {
|
/** @var \App\Models\User $user */
|
||||||
if (auth()->user()->can('edit', $vendor)) {
|
$user = auth()->user();
|
||||||
|
|
||||||
|
$vendors->each(function ($vendor, $key) use ($action, $user) {
|
||||||
|
if ($user->can('edit', $vendor)) {
|
||||||
$this->vendor_repo->{$action}($vendor);
|
$this->vendor_repo->{$action}($vendor);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -355,8 +355,11 @@ class WebhookController extends BaseController
|
|||||||
return response()->json('Invalid event', 400);
|
return response()->json('Invalid event', 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
$webhook = new Webhook();
|
$webhook = new Webhook();
|
||||||
$webhook->company_id = auth()->user()->company()->id;
|
$webhook->company_id = $user->company()->id;
|
||||||
$webhook->user_id = auth()->user()->id;
|
$webhook->user_id = auth()->user()->id;
|
||||||
$webhook->event_id = $event_id;
|
$webhook->event_id = $event_id;
|
||||||
$webhook->target_url = $target_url;
|
$webhook->target_url = $target_url;
|
||||||
|
@ -37,6 +37,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @property-read \App\Models\GatewayType|null $gateway_type
|
* @property-read \App\Models\GatewayType|null $gateway_type
|
||||||
* @property-read mixed $hashed_id
|
* @property-read mixed $hashed_id
|
||||||
* @property-read \App\Models\User $user
|
* @property-read \App\Models\User $user
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class ClientGatewayToken extends BaseModel
|
class ClientGatewayToken extends BaseModel
|
||||||
|
@ -98,7 +98,7 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property \App\Models\User|null $assigned_user
|
* @property \App\Models\User|null $assigned_user
|
||||||
* @property \App\Models\Client $client
|
* @property \App\Models\Client $client
|
||||||
* @property \App\Models\InvoiceInvitation $invitation
|
* @property \App\Models\InvoiceInvitation $invitation
|
||||||
* @property \App\Models\Company $company
|
* @property-read \App\Models\Company $company
|
||||||
* @property-read int|null $company_ledger_count
|
* @property-read int|null $company_ledger_count
|
||||||
* @property-read int|null $credits_count
|
* @property-read int|null $credits_count
|
||||||
* @property \App\Models\Design|null $design
|
* @property \App\Models\Design|null $design
|
||||||
@ -129,6 +129,7 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation> $invitations
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
|
||||||
* @property object|null $tax_data
|
* @property object|null $tax_data
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
@ -248,7 +249,10 @@ class Invoice extends BaseModel
|
|||||||
return $value ? $this->dateMutator($value) : null;
|
return $value ? $this->dateMutator($value) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<Company>
|
||||||
|
*/
|
||||||
|
public function company()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Company::class);
|
return $this->belongsTo(Company::class);
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,7 @@ use Illuminate\Support\Carbon;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\PurchaseOrderInvitation> $invitations
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|PurchaseOrder withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|PurchaseOrder withTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|PurchaseOrder withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|PurchaseOrder withoutTrashed()
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class PurchaseOrder extends BaseModel
|
class PurchaseOrder extends BaseModel
|
||||||
|
@ -106,7 +106,7 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $invitations
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QuoteInvitation> $invitations
|
||||||
*
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
* @mixin \Illuminate\Database\Eloquent\Builder
|
* @mixin \Illuminate\Database\Eloquent\Builder
|
||||||
*/
|
*/
|
||||||
|
@ -98,6 +98,7 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyToken> $tokens
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $companies
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel companies()
|
||||||
* @method bool hasPermissionTo(string $permission)
|
* @method bool hasPermissionTo(string $permission)
|
||||||
* @method \App\Models\Company getCompany()
|
* @method \App\Models\Company getCompany()
|
||||||
* @method \App\Models\Company company()
|
* @method \App\Models\Company company()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user