Customers Add+Edit, API WP
This commit is contained in:
parent
dc63fa9fb2
commit
75a0f9a38a
120 changed files with 11894 additions and 6134 deletions
28
app/User.php
28
app/User.php
|
|
@ -8,7 +8,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
|||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Mail\MailResetPassword;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
use Laravel\Passport\HasApiTokens;
|
||||
|
||||
/**
|
||||
* App\User
|
||||
|
|
@ -99,10 +99,23 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereReleaseAccount($value)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserHistory[] $user_histories
|
||||
* @property-read int|null $user_histories_count
|
||||
* @property int|null $test_mode
|
||||
* @property array|null $settings
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrder[] $member_shopping_orders
|
||||
* @property-read int|null $member_shopping_orders_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingUser[] $member_shopping_users
|
||||
* @property-read int|null $member_shopping_users_count
|
||||
* @property-read \App\Models\Product|null $payment_order_product
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereTestMode($value)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Client[] $clients
|
||||
* @property-read int|null $clients_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens
|
||||
* @property-read int|null $tokens_count
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
use Notifiable, HasApiTokens;
|
||||
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
|
@ -242,6 +255,17 @@ class User extends Authenticatable
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isApiUser()
|
||||
{
|
||||
if($this->admin >= 4){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue