pri registrasia 3 sany field goshulya fx1

This commit is contained in:
merdiano 2022-07-14 12:19:53 +05:00
parent 25a2b74695
commit c70be15063
8 changed files with 209 additions and 166 deletions

View File

@ -123,8 +123,16 @@ public function login(LoginRequest $request){
* property="password",
* type="string",
* ),
* @OA\Property(
* property="account_type",
* type="string",
* ),
* @OA\Property(
* property="country",
* type="integer",
* ),
*
* example={"firstname":"Mahri", "lastname":"Ilmedova" ,"email": "ilmedovamahri@gmail.com", "password": 12345678}
* example={"firstname":"Mahri", "lastname":"Ilmedova" ,"email": "ilmedovamahri@gmail.com", "password": 12345678, "country": 1,"account_type":"business"}
* )
* )
* ),
@ -153,42 +161,37 @@ public function login(LoginRequest $request){
* )
* )
*/
public function register(RegisterRequest $request){
public function register(RegisterRequest $request)
{
$client = new Client($request->only(['email','firstname','lastname']));
$client->password = Hash::make($request->input('password'));
$data = $request->only(['email','firstname','lastname']);
$data['password'] = Hash::make($request->input('password'));
$email_verification = (bool) Config::get('settings.email_verification');
$data['is_verified'] = ! $email_verification;
$data['verification_token'] = rand(10000, 99999);
$profileClass = config('account.models.'.$request->account_type);
$profile = $profileClass::create();
$account = new Account([
'country_id' => $request->country,
'legalization_number' => $request->legalization_number
]);
$account->accountable()
->associate($profile)
->save();
$client = new Client($data);
$client->account()
->associate($account)
->save();
$email_verification = (bool) config('settings.email_verification');
$client->is_verified = ! $email_verification;
if($email_verification)
{
Mail::to($request->email)
->queue(new EmailVerification($request->firstname, $client->verification_token));
$client->verification_token = rand(10000, 99999);
try{
Mail::to($request->email)
->queue(new EmailVerification($request->firstname, $client->verification_token));
}catch (\Exception $ex){
//eger email ugradyp bolmasa verification edip bolmaz
$client->is_verified = true;
}
}
else{
$account = Account::create([
'country_id' => $request->country,
'legalization_number' => $request->legalization_number,
'type' => $request->account_type
]);
$client->account()->associate($account)->save();
if($client->is_verified){
Auth::login($client);
$client->token = $client->createToken('auth_token')->plainTextToken;
}

View File

@ -20,7 +20,7 @@ class Account extends Model
// public $timestamps = false;
protected $guarded = ['id'];
protected $fillable = [
'contacts', 'bank', 'vat', 'country_id', 'legalization_number'
'contacts', 'bank', 'vat', 'country_id', 'legalization_number','type'
];
protected $casts = [
'contacts' => 'array',
@ -40,7 +40,7 @@ class Account extends Model
| RELATIONS
|--------------------------------------------------------------------------
*/
public function accountable()
public function profile()
{
return $this->morphTo();
}

View File

@ -43,7 +43,7 @@ class Business extends Model
*/
public function account()
{
return $this->morphOne(Account::class, 'accountable');
return $this->morphOne(Account::class, 'profile');
}
/*

View File

@ -55,7 +55,7 @@ class Company extends Model
*/
public function account()
{
return $this->morphOne(Account::class, 'accountable');
return $this->morphOne(Account::class, 'profile');
}
/*

259
composer.lock generated
View File

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "78b0d0de785ca43a7043e048b3e717b6",
"content-hash": "eb98a99c92a6ca19bbcf7630d5634a54",
"packages": [
{
"name": "backpack/crud",
"version": "5.1.2",
"version": "5.1.4",
"source": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/CRUD.git",
"reference": "a15f93a784e8d130f5ea5c3341fb7bca1f3c25e3"
"reference": "4539c787a2e052d2e2e2c00188c38432dc2a7ea9"
},
"dist": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/CRUD.git",
"reference": "a15f93a784e8d130f5ea5c3341fb7bca1f3c25e3",
"type": "zip",
"url": "https://api.github.com/repos/Laravel-Backpack/CRUD/zipball/4539c787a2e052d2e2e2c00188c38432dc2a7ea9",
"reference": "4539c787a2e052d2e2e2c00188c38432dc2a7ea9",
"shasum": ""
},
"require": {
@ -96,9 +96,9 @@
],
"support": {
"issues": "https://github.com/Laravel-Backpack/CRUD/issues",
"source": "https://github.com/Laravel-Backpack/CRUD/tree/5.1.2"
"source": "https://github.com/Laravel-Backpack/CRUD/tree/5.1.4"
},
"time": "2022-06-22T06:53:56+00:00"
"time": "2022-07-03T06:04:17+00:00"
},
{
"name": "backpack/filemanager",
@ -240,16 +240,16 @@
},
{
"name": "backpack/logmanager",
"version": "v4.0.7",
"version": "v4.0.8",
"source": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/LogManager.git",
"reference": "75a4e028e42f85dac0c301ebf22c83075535dc23"
"reference": "81d9a5115e3ce6c780f00dd856db5bf25b1f376f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Laravel-Backpack/LogManager/zipball/75a4e028e42f85dac0c301ebf22c83075535dc23",
"reference": "75a4e028e42f85dac0c301ebf22c83075535dc23",
"url": "https://api.github.com/repos/Laravel-Backpack/LogManager/zipball/81d9a5115e3ce6c780f00dd856db5bf25b1f376f",
"reference": "81d9a5115e3ce6c780f00dd856db5bf25b1f376f",
"shasum": ""
},
"require": {
@ -298,9 +298,9 @@
],
"support": {
"issues": "https://github.com/Laravel-Backpack/LogManager/issues",
"source": "https://github.com/Laravel-Backpack/LogManager/tree/v4.0.7"
"source": "https://github.com/Laravel-Backpack/LogManager/tree/v4.0.8"
},
"time": "2022-03-25T08:48:24+00:00"
"time": "2022-07-01T12:18:59+00:00"
},
{
"name": "backpack/permissionmanager",
@ -995,16 +995,16 @@
},
{
"name": "doctrine/annotations",
"version": "1.13.2",
"version": "1.13.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "5b668aef16090008790395c02c893b1ba13f7e08"
"reference": "648b0343343565c4a056bfc8392201385e8d89f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08",
"reference": "5b668aef16090008790395c02c893b1ba13f7e08",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0",
"reference": "648b0343343565c4a056bfc8392201385e8d89f0",
"shasum": ""
},
"require": {
@ -1016,9 +1016,10 @@
"require-dev": {
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/coding-standard": "^6.0 || ^8.1",
"phpstan/phpstan": "^0.12.20",
"phpstan/phpstan": "^1.4.10 || ^1.8.0",
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
"symfony/cache": "^4.4 || ^5.2"
"symfony/cache": "^4.4 || ^5.2",
"vimeo/psalm": "^4.10"
},
"type": "library",
"autoload": {
@ -1061,9 +1062,9 @@
],
"support": {
"issues": "https://github.com/doctrine/annotations/issues",
"source": "https://github.com/doctrine/annotations/tree/1.13.2"
"source": "https://github.com/doctrine/annotations/tree/1.13.3"
},
"time": "2021-08-05T19:00:23+00:00"
"time": "2022-07-02T10:48:51+00:00"
},
{
"name": "doctrine/cache",
@ -2244,16 +2245,16 @@
},
{
"name": "laravel/framework",
"version": "v9.18.0",
"version": "v9.20.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "93a1296bca43c1ca8dcb5df8f97107e819a71499"
"reference": "c99868f1c9bf2f5d250993121838db905591864f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/93a1296bca43c1ca8dcb5df8f97107e819a71499",
"reference": "93a1296bca43c1ca8dcb5df8f97107e819a71499",
"url": "https://api.github.com/repos/laravel/framework/zipball/c99868f1c9bf2f5d250993121838db905591864f",
"reference": "c99868f1c9bf2f5d250993121838db905591864f",
"shasum": ""
},
"require": {
@ -2419,7 +2420,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2022-06-21T14:40:11+00:00"
"time": "2022-07-13T13:26:22+00:00"
},
{
"name": "laravel/sanctum",
@ -2803,16 +2804,16 @@
},
{
"name": "league/flysystem",
"version": "3.0.21",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "8f1fcf9d2304ff77a006aa36dd2cb5f236999b12"
"reference": "34a68067b7ae3b836ea5e57e1fc432478372a4f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8f1fcf9d2304ff77a006aa36dd2cb5f236999b12",
"reference": "8f1fcf9d2304ff77a006aa36dd2cb5f236999b12",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/34a68067b7ae3b836ea5e57e1fc432478372a4f5",
"reference": "34a68067b7ae3b836ea5e57e1fc432478372a4f5",
"shasum": ""
},
"require": {
@ -2873,7 +2874,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.0.21"
"source": "https://github.com/thephpleague/flysystem/tree/3.1.0"
},
"funding": [
{
@ -2889,7 +2890,7 @@
"type": "tidelift"
}
],
"time": "2022-06-12T17:54:28+00:00"
"time": "2022-06-29T17:29:54+00:00"
},
{
"name": "league/mime-type-detection",
@ -3053,16 +3054,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.58.0",
"version": "2.59.1",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "97a34af22bde8d0ac20ab34b29d7bfe360902055"
"reference": "a9000603ea337c8df16cc41f8b6be95a65f4d0f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/97a34af22bde8d0ac20ab34b29d7bfe360902055",
"reference": "97a34af22bde8d0ac20ab34b29d7bfe360902055",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a9000603ea337c8df16cc41f8b6be95a65f4d0f5",
"reference": "a9000603ea337c8df16cc41f8b6be95a65f4d0f5",
"shasum": ""
},
"require": {
@ -3077,11 +3078,12 @@
"doctrine/orm": "^2.7",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
"ondrejmirtes/better-reflection": "*",
"phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.54 || ^1.0",
"phpunit/php-file-iterator": "^2.0.5",
"phpunit/phpunit": "^7.5.20 || ^8.5.23",
"phpstan/phpstan": "^0.12.99 || ^1.7.14",
"phpunit/php-file-iterator": "^2.0.5 || ^3.0.6",
"phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20",
"squizlabs/php_codesniffer": "^3.4"
},
"bin": [
@ -3138,15 +3140,19 @@
},
"funding": [
{
"url": "https://opencollective.com/Carbon",
"type": "open_collective"
"url": "https://github.com/sponsors/kylekatarnls",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
"url": "https://opencollective.com/Carbon#sponsor",
"type": "opencollective"
},
{
"url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme",
"type": "tidelift"
}
],
"time": "2022-04-25T19:31:17+00:00"
"time": "2022-06-29T21:43:55+00:00"
},
{
"name": "nette/schema",
@ -3906,16 +3912,16 @@
},
{
"name": "psy/psysh",
"version": "v0.11.5",
"version": "v0.11.7",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
"reference": "c23686f9c48ca202710dbb967df8385a952a2daf"
"reference": "77fc7270031fbc28f9a7bea31385da5c4855cb7a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/c23686f9c48ca202710dbb967df8385a952a2daf",
"reference": "c23686f9c48ca202710dbb967df8385a952a2daf",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/77fc7270031fbc28f9a7bea31385da5c4855cb7a",
"reference": "77fc7270031fbc28f9a7bea31385da5c4855cb7a",
"shasum": ""
},
"require": {
@ -3976,9 +3982,9 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
"source": "https://github.com/bobthecow/psysh/tree/v0.11.5"
"source": "https://github.com/bobthecow/psysh/tree/v0.11.7"
},
"time": "2022-05-27T18:03:49+00:00"
"time": "2022-07-07T13:49:11+00:00"
},
{
"name": "ralouphie/getallheaders",
@ -4199,16 +4205,16 @@
},
{
"name": "spatie/laravel-permission",
"version": "5.5.4",
"version": "5.5.5",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-permission.git",
"reference": "cb86fd87b43fcfc493c3f2b1de6fad100c078146"
"reference": "f2303a70be60919811ca8afc313e8244fda00974"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/cb86fd87b43fcfc493c3f2b1de6fad100c078146",
"reference": "cb86fd87b43fcfc493c3f2b1de6fad100c078146",
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/f2303a70be60919811ca8afc313e8244fda00974",
"reference": "f2303a70be60919811ca8afc313e8244fda00974",
"shasum": ""
},
"require": {
@ -4269,7 +4275,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-permission/issues",
"source": "https://github.com/spatie/laravel-permission/tree/5.5.4"
"source": "https://github.com/spatie/laravel-permission/tree/5.5.5"
},
"funding": [
{
@ -4277,7 +4283,7 @@
"type": "github"
}
],
"time": "2022-05-16T12:09:59+00:00"
"time": "2022-06-29T23:11:42+00:00"
},
{
"name": "studio-42/elfinder",
@ -4410,16 +4416,16 @@
},
{
"name": "symfony/console",
"version": "v6.1.1",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "6187424023fbffcd757789aeb517c9161b1eabee"
"reference": "7a86c1c42fbcb69b59768504c7bca1d3767760b7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/6187424023fbffcd757789aeb517c9161b1eabee",
"reference": "6187424023fbffcd757789aeb517c9161b1eabee",
"url": "https://api.github.com/repos/symfony/console/zipball/7a86c1c42fbcb69b59768504c7bca1d3767760b7",
"reference": "7a86c1c42fbcb69b59768504c7bca1d3767760b7",
"shasum": ""
},
"require": {
@ -4486,7 +4492,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v6.1.1"
"source": "https://github.com/symfony/console/tree/v6.1.2"
},
"funding": [
{
@ -4502,7 +4508,7 @@
"type": "tidelift"
}
],
"time": "2022-06-08T14:02:09+00:00"
"time": "2022-06-26T13:01:30+00:00"
},
{
"name": "symfony/css-selector",
@ -4571,7 +4577,7 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.1.0",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
@ -4618,7 +4624,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.0"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1"
},
"funding": [
{
@ -4792,7 +4798,7 @@
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v3.1.0",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
@ -4851,7 +4857,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.0"
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1"
},
"funding": [
{
@ -4935,16 +4941,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.1.1",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "a58dc88d56e04e57993d96c1407a17407610e1df"
"reference": "86119d294e51afe4d8e07da96b63332bd1f3f52c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/a58dc88d56e04e57993d96c1407a17407610e1df",
"reference": "a58dc88d56e04e57993d96c1407a17407610e1df",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/86119d294e51afe4d8e07da96b63332bd1f3f52c",
"reference": "86119d294e51afe4d8e07da96b63332bd1f3f52c",
"shasum": ""
},
"require": {
@ -4987,7 +4993,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.1.1"
"source": "https://github.com/symfony/http-foundation/tree/v6.1.2"
},
"funding": [
{
@ -5003,20 +5009,20 @@
"type": "tidelift"
}
],
"time": "2022-05-31T14:28:03+00:00"
"time": "2022-06-19T13:21:48+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v6.1.1",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "86c4d6f6c5b6cd012df41e3b950c924b3ffdc019"
"reference": "8aaede489900dda61aee208557f63bfa1bca0877"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/86c4d6f6c5b6cd012df41e3b950c924b3ffdc019",
"reference": "86c4d6f6c5b6cd012df41e3b950c924b3ffdc019",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/8aaede489900dda61aee208557f63bfa1bca0877",
"reference": "8aaede489900dda61aee208557f63bfa1bca0877",
"shasum": ""
},
"require": {
@ -5097,7 +5103,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.1.1"
"source": "https://github.com/symfony/http-kernel/tree/v6.1.2"
},
"funding": [
{
@ -5113,20 +5119,20 @@
"type": "tidelift"
}
],
"time": "2022-06-09T17:31:33+00:00"
"time": "2022-06-26T17:06:14+00:00"
},
{
"name": "symfony/mailer",
"version": "v6.1.1",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/mailer.git",
"reference": "db6a19a5c896139901c2de59fc9849379e0ff3b6"
"reference": "8fa150355115ea09238858ae3cfaf249fd1fd5ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mailer/zipball/db6a19a5c896139901c2de59fc9849379e0ff3b6",
"reference": "db6a19a5c896139901c2de59fc9849379e0ff3b6",
"url": "https://api.github.com/repos/symfony/mailer/zipball/8fa150355115ea09238858ae3cfaf249fd1fd5ed",
"reference": "8fa150355115ea09238858ae3cfaf249fd1fd5ed",
"shasum": ""
},
"require": {
@ -5171,7 +5177,7 @@
"description": "Helps sending emails",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/mailer/tree/v6.1.1"
"source": "https://github.com/symfony/mailer/tree/v6.1.2"
},
"funding": [
{
@ -5187,7 +5193,7 @@
"type": "tidelift"
}
],
"time": "2022-06-06T19:15:01+00:00"
"time": "2022-06-19T13:21:48+00:00"
},
{
"name": "symfony/mime",
@ -6076,16 +6082,16 @@
},
{
"name": "symfony/service-contracts",
"version": "v3.1.0",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "d66cd8ab656780f62c4215b903a420eb86358957"
"reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/d66cd8ab656780f62c4215b903a420eb86358957",
"reference": "d66cd8ab656780f62c4215b903a420eb86358957",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239",
"reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239",
"shasum": ""
},
"require": {
@ -6141,7 +6147,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/service-contracts/tree/v3.1.0"
"source": "https://github.com/symfony/service-contracts/tree/v3.1.1"
},
"funding": [
{
@ -6157,20 +6163,20 @@
"type": "tidelift"
}
],
"time": "2022-05-07T08:07:09+00:00"
"time": "2022-05-30T19:18:58+00:00"
},
{
"name": "symfony/string",
"version": "v6.1.0",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "d3edc75baf9f1d4f94879764dda2e1ac33499529"
"reference": "1903f2879875280c5af944625e8246d81c2f0604"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/d3edc75baf9f1d4f94879764dda2e1ac33499529",
"reference": "d3edc75baf9f1d4f94879764dda2e1ac33499529",
"url": "https://api.github.com/repos/symfony/string/zipball/1903f2879875280c5af944625e8246d81c2f0604",
"reference": "1903f2879875280c5af944625e8246d81c2f0604",
"shasum": ""
},
"require": {
@ -6226,7 +6232,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v6.1.0"
"source": "https://github.com/symfony/string/tree/v6.1.2"
},
"funding": [
{
@ -6242,7 +6248,7 @@
"type": "tidelift"
}
],
"time": "2022-04-22T08:18:23+00:00"
"time": "2022-06-26T16:35:04+00:00"
},
{
"name": "symfony/translation",
@ -6342,16 +6348,16 @@
},
{
"name": "symfony/translation-contracts",
"version": "v3.1.0",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation-contracts.git",
"reference": "bfddd2a1faa271b782b791c361cc16e2dd49dfaa"
"reference": "606be0f48e05116baef052f7f3abdb345c8e02cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/bfddd2a1faa271b782b791c361cc16e2dd49dfaa",
"reference": "bfddd2a1faa271b782b791c361cc16e2dd49dfaa",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/606be0f48e05116baef052f7f3abdb345c8e02cc",
"reference": "606be0f48e05116baef052f7f3abdb345c8e02cc",
"shasum": ""
},
"require": {
@ -6403,7 +6409,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/translation-contracts/tree/v3.1.0"
"source": "https://github.com/symfony/translation-contracts/tree/v3.1.1"
},
"funding": [
{
@ -6419,7 +6425,7 @@
"type": "tidelift"
}
],
"time": "2022-04-22T07:30:54+00:00"
"time": "2022-06-27T17:24:16+00:00"
},
{
"name": "symfony/var-dumper",
@ -6511,16 +6517,16 @@
},
{
"name": "symfony/yaml",
"version": "v6.1.0",
"version": "v6.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "84ce4f9d2d68f306f971a39d949d8f4b5550dba2"
"reference": "b01c4e7dc6a51cbf114567af04a19789fd1011fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/84ce4f9d2d68f306f971a39d949d8f4b5550dba2",
"reference": "84ce4f9d2d68f306f971a39d949d8f4b5550dba2",
"url": "https://api.github.com/repos/symfony/yaml/zipball/b01c4e7dc6a51cbf114567af04a19789fd1011fe",
"reference": "b01c4e7dc6a51cbf114567af04a19789fd1011fe",
"shasum": ""
},
"require": {
@ -6565,7 +6571,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v6.1.0"
"source": "https://github.com/symfony/yaml/tree/v6.1.2"
},
"funding": [
{
@ -6581,7 +6587,7 @@
"type": "tidelift"
}
],
"time": "2022-04-15T14:25:02+00:00"
"time": "2022-06-20T12:01:07+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@ -6850,16 +6856,16 @@
},
{
"name": "zircote/swagger-php",
"version": "4.4.5",
"version": "4.4.7",
"source": {
"type": "git",
"url": "https://github.com/zircote/swagger-php.git",
"reference": "fd8f1eb8d0165c7a668f307fbccbf3adf33f4017"
"reference": "97abe42376b41e072ede13b6f0582457a54d797a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zircote/swagger-php/zipball/fd8f1eb8d0165c7a668f307fbccbf3adf33f4017",
"reference": "fd8f1eb8d0165c7a668f307fbccbf3adf33f4017",
"url": "https://api.github.com/repos/zircote/swagger-php/zipball/97abe42376b41e072ede13b6f0582457a54d797a",
"reference": "97abe42376b41e072ede13b6f0582457a54d797a",
"shasum": ""
},
"require": {
@ -6921,9 +6927,9 @@
],
"support": {
"issues": "https://github.com/zircote/swagger-php/issues",
"source": "https://github.com/zircote/swagger-php/tree/4.4.5"
"source": "https://github.com/zircote/swagger-php/tree/4.4.7"
},
"time": "2022-06-02T21:05:02+00:00"
"time": "2022-07-02T04:55:25+00:00"
}
],
"packages-dev": [
@ -7311,16 +7317,16 @@
},
{
"name": "laravel/sail",
"version": "v1.14.11",
"version": "v1.15.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "6edf45a247b3688e0d07e149570a62fd9bc11c73"
"reference": "676e1ff33c1b8af657779f62f57360c376cba666"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/6edf45a247b3688e0d07e149570a62fd9bc11c73",
"reference": "6edf45a247b3688e0d07e149570a62fd9bc11c73",
"url": "https://api.github.com/repos/laravel/sail/zipball/676e1ff33c1b8af657779f62f57360c376cba666",
"reference": "676e1ff33c1b8af657779f62f57360c376cba666",
"shasum": ""
},
"require": {
@ -7367,7 +7373,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2022-06-13T18:32:48+00:00"
"time": "2022-06-24T13:56:11+00:00"
},
{
"name": "mockery/mockery",
@ -7502,16 +7508,16 @@
},
{
"name": "nunomaduro/collision",
"version": "v6.2.0",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/collision.git",
"reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25"
"reference": "5f058f7e39278b701e455b3c82ec5298cf001d89"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/c379636dc50e829edb3a8bcb944a01aa1aed8f25",
"reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25",
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/5f058f7e39278b701e455b3c82ec5298cf001d89",
"reference": "5f058f7e39278b701e455b3c82ec5298cf001d89",
"shasum": ""
},
"require": {
@ -7523,6 +7529,7 @@
"require-dev": {
"brianium/paratest": "^6.4.1",
"laravel/framework": "^9.7",
"laravel/pint": "^0.2.1",
"nunomaduro/larastan": "^1.0.2",
"nunomaduro/mock-final-classes": "^1.1.0",
"orchestra/testbench": "^7.3.0",
@ -7585,7 +7592,7 @@
"type": "patreon"
}
],
"time": "2022-04-05T15:31:38+00:00"
"time": "2022-06-27T16:11:16+00:00"
},
{
"name": "phar-io/manifest",
@ -9662,8 +9669,8 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.0.14"
"php": "^8.0.9"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.1.0"
}

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('accounts', function (Blueprint $table){
$table->string('type')->nullable();
$table->date('expires_at')->nullable();
$table->morphs('profile');
$table->dropMorphs('accountable');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};

View File

@ -32,6 +32,6 @@
<li class='nav-item'><a class='nav-link' href='{{ backpack_url('question') }}'><i class='nav-icon la la-question'></i> Questions</a></li>
<li class='nav-item'><a class='nav-link' href='{{ backpack_url('document') }}'><i class='nav-icon la la-question'></i> Documents</a></li>
<li class='nav-item'><a class='nav-link' href='{{ backpack_url('documentgroup') }}'><i class='nav-icon la la-question'></i> Documentgroups</a></li>
<li class='nav-item'><a class='nav-link' href='{{ backpack_url('documentgroup-document') }}'><i class='nav-icon la la-question'></i> Documentgroup documents</a></li>
<li class='nav-item'><a class='nav-link' href='{{ backpack_url('documentgroup-country') }}'><i class='nav-icon la la-question'></i> Documentgroup countries</a></li>
{{--<li class='nav-item'><a class='nav-link' href='{{ backpack_url('documentgroup-document') }}'><i class='nav-icon la la-question'></i> Documentgroup documents</a></li>--}}
{{--<li class='nav-item'><a class='nav-link' href='{{ backpack_url('documentgroup-country') }}'><i class='nav-icon la la-question'></i> Documentgroup countries</a></li>--}}
<li class='nav-item'><a class='nav-link' href='{{ backpack_url('setting') }}'><i class='nav-icon la la-cog'></i> <span>Settings</span></a></li>

View File

@ -27,6 +27,6 @@
Route::crud('question', 'QuestionCrudController');
Route::crud('document', 'DocumentCrudController');
Route::crud('documentgroup', 'DocumentgroupCrudController');
Route::crud('documentgroup-document', 'DocumentgroupDocumentCrudController');
Route::crud('documentgroup-country', 'DocumentgroupCountryCrudController');
// Route::crud('documentgroup-document', 'DocumentgroupDocumentCrudController');
// Route::crud('documentgroup-country', 'DocumentgroupCountryCrudController');
}); // this should be the absolute last line of this file