Commit f9b52750 by 杨树贤

用户地址seeder

parent 99f65a05
......@@ -19,10 +19,10 @@ class HandleInquiry extends BatchAction
{
$form = \App\Admin\Forms\HandleInquiry::make();
$buttonName = trans('inquiry.labels.handle');
return Modal::make()->lg()->title($this->title)->body($form)
->onLoad($this->getModalScript())
return Modal::make()->lg()->title($this->title)->body($form->payload([
]))->onLoad($this->getModalScript())
->button('<button class="btn btn-primary">
<i class="feather icon-check-circle"></i><span class="d-none d-sm-inline" style="margin-left: 5px">'.$buttonName.'</span>
<i class="feather icon-check-circle"></i><span class="d-none d-sm-inline" style="margin-left: 5px">' . $buttonName . '</span>
</button>');
}
......
......@@ -27,6 +27,9 @@ class InquiryController extends AdminController
return Grid::make(new Inquiry(['user','sales_user']), function (Grid $grid) {
$grid->showFilter();
$grid->disableActions();
$grid->disableFilterButton();
$grid->disableRefreshButton();
$grid->disableCreateButton();
$grid->filter(function ($filter) {
$filter->expand(true);
$filter->whereBetween('create_time', function ($q) {
......
......@@ -151,6 +151,10 @@ body:not(.dark-mode) .table-fixed table.custom-data-table thead tr th{
body:not(.dark-mode) .table-fixed table.custom-data-table thead tr th {
z-index: 99;
}
.table .default-table td{
height: 30px;!important;
}
CSS
);
......
......@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Model;
class UserAddress extends Model
{
use HasDateTimeFormatter;
protected $table = 'user_addresses';
protected $table = 'user_address';
public $timestamps = false;
}
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use Faker\Generator as Faker;
$factory->define(\App\Models\UserAddress::class, function (Faker $faker) {
return [
'user_id' => $faker->numberBetween(1, 50),
'address_type' => $faker->numberBetween(1, 2),
'consignee' => $faker->company(),
'email' => $faker->email(),
'zipcode' => $faker->postcode(),
'phone' => $faker->phoneNumber(),
'country' => $faker->country(),
'province' => $faker->country(),
'city' => $faker->city(),
'detail_address' => $faker->address(),
'create_time' => time() + rand(1, 2000),
];
});
......@@ -11,8 +11,9 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call(UserAddressSeeder::class);
// $this->call(UserSeeder::class);
$this->call(InquirySeeder::class);
// $this->call(InquirySeeder::class);
// $this->call(InquiryItemsSeeder::class);
}
}
<?php
use Illuminate\Database\Seeder;
class UserAddressSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(App\Models\UserAddress::class, 50)->create()->each(function ($user) {
$user->insert(factory(\App\Models\UserAddress::class)->make());
});
}
}
......@@ -7,12 +7,18 @@ $baseDir = dirname($vendorDir);
return array(
'App\\Admin\\Actions\\AdminSetting' => $baseDir . '/app/Admin/Actions/AdminSetting.php',
'App\\Admin\\Actions\\Grid\\HandleInquiry' => $baseDir . '/app/Admin/Actions/Grid/HandleInquiry.php',
'App\\Admin\\Controllers\\AuthController' => $baseDir . '/app/Admin/Controllers/AuthController.php',
'App\\Admin\\Controllers\\HomeController' => $baseDir . '/app/Admin/Controllers/HomeController.php',
'App\\Admin\\Controllers\\InquiryController' => $baseDir . '/app/Admin/Controllers/InquiryController.php',
'App\\Admin\\Controllers\\OrderController' => $baseDir . '/app/Admin/Controllers/OrderController.php',
'App\\Admin\\Controllers\\OrderItemController' => $baseDir . '/app/Admin/Controllers/OrderItemController.php',
'App\\Admin\\Controllers\\ScmUserController' => $baseDir . '/app/Admin/Controllers/ScmUserController.php',
'App\\Admin\\Controllers\\TestController' => $baseDir . '/app/Admin/Controllers/TestController.php',
'App\\Admin\\Controllers\\UserAddressController' => $baseDir . '/app/Admin/Controllers/UserAddressController.php',
'App\\Admin\\Extensions\\Show\\Textarea' => $baseDir . '/app/Admin/Extensions/Show/Textarea.php',
'App\\Admin\\Forms\\AdminSetting' => $baseDir . '/app/Admin/Forms/AdminSetting.php',
'App\\Admin\\Forms\\HandleInquiry' => $baseDir . '/app/Admin/Forms/HandleInquiry.php',
'App\\Admin\\Forms\\ResetPassword' => $baseDir . '/app/Admin/Forms/ResetPassword.php',
'App\\Admin\\Forms\\Setting' => $baseDir . '/app/Admin/Forms/Setting.php',
'App\\Admin\\Forms\\UserProfile' => $baseDir . '/app/Admin/Forms/UserProfile.php',
......@@ -22,8 +28,22 @@ return array(
'App\\Admin\\Metrics\\Examples\\Sessions' => $baseDir . '/app/Admin/Metrics/Examples/Sessions.php',
'App\\Admin\\Metrics\\Examples\\Tickets' => $baseDir . '/app/Admin/Metrics/Examples/Tickets.php',
'App\\Admin\\Metrics\\Examples\\TotalUsers' => $baseDir . '/app/Admin/Metrics/Examples/TotalUsers.php',
'App\\Admin\\Renderable\\AdminSetting' => $baseDir . '/app/Admin/Renderable/AdminSetting.php',
'App\\Admin\\Renderable\\BarChart' => $baseDir . '/app/Admin/Renderable/BarChart.php',
'App\\Admin\\Renderable\\InquiryDetail' => $baseDir . '/app/Admin/Renderable/InquiryDetail.php',
'App\\Admin\\Renderable\\ModalForm' => $baseDir . '/app/Admin/Renderable/ModalForm.php',
'App\\Admin\\Renderable\\PostTable' => $baseDir . '/app/Admin/Renderable/PostTable.php',
'App\\Admin\\Renderable\\UserTable' => $baseDir . '/app/Admin/Renderable/UserTable.php',
'App\\Admin\\Repositories\\Inquiry' => $baseDir . '/app/Admin/Repositories/Inquiry.php',
'App\\Admin\\Repositories\\Order' => $baseDir . '/app/Admin/Repositories/Order.php',
'App\\Admin\\Repositories\\OrderItem' => $baseDir . '/app/Admin/Repositories/OrderItem.php',
'App\\Admin\\Repositories\\ScmUser' => $baseDir . '/app/Admin/Repositories/ScmUser.php',
'App\\Admin\\Repositories\\UserAddress' => $baseDir . '/app/Admin/Repositories/UserAddress.php',
'App\\Admin\\RowActions\\Copy' => $baseDir . '/app/Admin/RowActions/Copy.php',
'App\\Admin\\Traits\\BatchAction' => $baseDir . '/app/Admin/Traits/BatchAction.php',
'App\\Admin\\Widgets\\Charts\\Bar' => $baseDir . '/app/Admin/Widgets/Charts/Bar.php',
'App\\Admin\\Widgets\\Charts\\MyAjaxBar' => $baseDir . '/app/Admin/Widgets/Charts/MyAjaxBar.php',
'App\\Admin\\Widgets\\Charts\\MyBar' => $baseDir . '/app/Admin/Widgets/Charts/MyBar.php',
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php',
......@@ -39,14 +59,19 @@ return array(
'App\\Http\\Middleware\\TrustHosts' => $baseDir . '/app/Http/Middleware/TrustHosts.php',
'App\\Http\\Middleware\\TrustProxies' => $baseDir . '/app/Http/Middleware/TrustProxies.php',
'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php',
'App\\Models\\Cms\\CmsUser' => $baseDir . '/app/Models/Cms/CmsUser.php',
'App\\Models\\Inquiry' => $baseDir . '/app/Models/Inquiry.php',
'App\\Models\\InquiryItems' => $baseDir . '/app/Models/InquiryItems.php',
'App\\Models\\Order' => $baseDir . '/app/Models/Order.php',
'App\\Models\\OrderItem' => $baseDir . '/app/Models/OrderItem.php',
'App\\Models\\ScmUser' => $baseDir . '/app/Models/ScmUser.php',
'App\\Models\\User' => $baseDir . '/app/Models/User.php',
'App\\Models\\UserAddress' => $baseDir . '/app/Models/UserAddress.php',
'App\\Providers\\AppServiceProvider' => $baseDir . '/app/Providers/AppServiceProvider.php',
'App\\Providers\\AuthServiceProvider' => $baseDir . '/app/Providers/AuthServiceProvider.php',
'App\\Providers\\BroadcastServiceProvider' => $baseDir . '/app/Providers/BroadcastServiceProvider.php',
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
'App\\User' => $baseDir . '/app/User.php',
'Asm89\\Stack\\Cors' => $vendorDir . '/asm89/stack-cors/src/Cors.php',
'Asm89\\Stack\\CorsService' => $vendorDir . '/asm89/stack-cors/src/CorsService.php',
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
......@@ -2761,6 +2786,7 @@ return array(
'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php',
'Illuminate\\View\\ViewName' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewName.php',
'Illuminate\\View\\ViewServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php',
'InquiryItemsSeeder' => $baseDir . '/database/seeds/InquiryItemsSeeder.php',
'InquirySeeder' => $baseDir . '/database/seeds/InquirySeeder.php',
'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'Laravel\\Tinker\\ClassAliasAutoloader' => $vendorDir . '/laravel/tinker/src/ClassAliasAutoloader.php',
......@@ -5284,6 +5310,7 @@ return array(
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php',
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php',
'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'UserAddressSeeder' => $baseDir . '/database/seeds/UserAddressSeeder.php',
'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php',
'Whoops\\Exception\\Formatter' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Formatter.php',
......
......@@ -496,12 +496,18 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
public static $classMap = array (
'App\\Admin\\Actions\\AdminSetting' => __DIR__ . '/../..' . '/app/Admin/Actions/AdminSetting.php',
'App\\Admin\\Actions\\Grid\\HandleInquiry' => __DIR__ . '/../..' . '/app/Admin/Actions/Grid/HandleInquiry.php',
'App\\Admin\\Controllers\\AuthController' => __DIR__ . '/../..' . '/app/Admin/Controllers/AuthController.php',
'App\\Admin\\Controllers\\HomeController' => __DIR__ . '/../..' . '/app/Admin/Controllers/HomeController.php',
'App\\Admin\\Controllers\\InquiryController' => __DIR__ . '/../..' . '/app/Admin/Controllers/InquiryController.php',
'App\\Admin\\Controllers\\OrderController' => __DIR__ . '/../..' . '/app/Admin/Controllers/OrderController.php',
'App\\Admin\\Controllers\\OrderItemController' => __DIR__ . '/../..' . '/app/Admin/Controllers/OrderItemController.php',
'App\\Admin\\Controllers\\ScmUserController' => __DIR__ . '/../..' . '/app/Admin/Controllers/ScmUserController.php',
'App\\Admin\\Controllers\\TestController' => __DIR__ . '/../..' . '/app/Admin/Controllers/TestController.php',
'App\\Admin\\Controllers\\UserAddressController' => __DIR__ . '/../..' . '/app/Admin/Controllers/UserAddressController.php',
'App\\Admin\\Extensions\\Show\\Textarea' => __DIR__ . '/../..' . '/app/Admin/Extensions/Show/Textarea.php',
'App\\Admin\\Forms\\AdminSetting' => __DIR__ . '/../..' . '/app/Admin/Forms/AdminSetting.php',
'App\\Admin\\Forms\\HandleInquiry' => __DIR__ . '/../..' . '/app/Admin/Forms/HandleInquiry.php',
'App\\Admin\\Forms\\ResetPassword' => __DIR__ . '/../..' . '/app/Admin/Forms/ResetPassword.php',
'App\\Admin\\Forms\\Setting' => __DIR__ . '/../..' . '/app/Admin/Forms/Setting.php',
'App\\Admin\\Forms\\UserProfile' => __DIR__ . '/../..' . '/app/Admin/Forms/UserProfile.php',
......@@ -511,8 +517,22 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'App\\Admin\\Metrics\\Examples\\Sessions' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/Sessions.php',
'App\\Admin\\Metrics\\Examples\\Tickets' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/Tickets.php',
'App\\Admin\\Metrics\\Examples\\TotalUsers' => __DIR__ . '/../..' . '/app/Admin/Metrics/Examples/TotalUsers.php',
'App\\Admin\\Renderable\\AdminSetting' => __DIR__ . '/../..' . '/app/Admin/Renderable/AdminSetting.php',
'App\\Admin\\Renderable\\BarChart' => __DIR__ . '/../..' . '/app/Admin/Renderable/BarChart.php',
'App\\Admin\\Renderable\\InquiryDetail' => __DIR__ . '/../..' . '/app/Admin/Renderable/InquiryDetail.php',
'App\\Admin\\Renderable\\ModalForm' => __DIR__ . '/../..' . '/app/Admin/Renderable/ModalForm.php',
'App\\Admin\\Renderable\\PostTable' => __DIR__ . '/../..' . '/app/Admin/Renderable/PostTable.php',
'App\\Admin\\Renderable\\UserTable' => __DIR__ . '/../..' . '/app/Admin/Renderable/UserTable.php',
'App\\Admin\\Repositories\\Inquiry' => __DIR__ . '/../..' . '/app/Admin/Repositories/Inquiry.php',
'App\\Admin\\Repositories\\Order' => __DIR__ . '/../..' . '/app/Admin/Repositories/Order.php',
'App\\Admin\\Repositories\\OrderItem' => __DIR__ . '/../..' . '/app/Admin/Repositories/OrderItem.php',
'App\\Admin\\Repositories\\ScmUser' => __DIR__ . '/../..' . '/app/Admin/Repositories/ScmUser.php',
'App\\Admin\\Repositories\\UserAddress' => __DIR__ . '/../..' . '/app/Admin/Repositories/UserAddress.php',
'App\\Admin\\RowActions\\Copy' => __DIR__ . '/../..' . '/app/Admin/RowActions/Copy.php',
'App\\Admin\\Traits\\BatchAction' => __DIR__ . '/../..' . '/app/Admin/Traits/BatchAction.php',
'App\\Admin\\Widgets\\Charts\\Bar' => __DIR__ . '/../..' . '/app/Admin/Widgets/Charts/Bar.php',
'App\\Admin\\Widgets\\Charts\\MyAjaxBar' => __DIR__ . '/../..' . '/app/Admin/Widgets/Charts/MyAjaxBar.php',
'App\\Admin\\Widgets\\Charts\\MyBar' => __DIR__ . '/../..' . '/app/Admin/Widgets/Charts/MyBar.php',
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php',
......@@ -528,14 +548,19 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'App\\Http\\Middleware\\TrustHosts' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustHosts.php',
'App\\Http\\Middleware\\TrustProxies' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustProxies.php',
'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php',
'App\\Models\\Cms\\CmsUser' => __DIR__ . '/../..' . '/app/Models/Cms/CmsUser.php',
'App\\Models\\Inquiry' => __DIR__ . '/../..' . '/app/Models/Inquiry.php',
'App\\Models\\InquiryItems' => __DIR__ . '/../..' . '/app/Models/InquiryItems.php',
'App\\Models\\Order' => __DIR__ . '/../..' . '/app/Models/Order.php',
'App\\Models\\OrderItem' => __DIR__ . '/../..' . '/app/Models/OrderItem.php',
'App\\Models\\ScmUser' => __DIR__ . '/../..' . '/app/Models/ScmUser.php',
'App\\Models\\User' => __DIR__ . '/../..' . '/app/Models/User.php',
'App\\Models\\UserAddress' => __DIR__ . '/../..' . '/app/Models/UserAddress.php',
'App\\Providers\\AppServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AppServiceProvider.php',
'App\\Providers\\AuthServiceProvider' => __DIR__ . '/../..' . '/app/Providers/AuthServiceProvider.php',
'App\\Providers\\BroadcastServiceProvider' => __DIR__ . '/../..' . '/app/Providers/BroadcastServiceProvider.php',
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
'Asm89\\Stack\\Cors' => __DIR__ . '/..' . '/asm89/stack-cors/src/Cors.php',
'Asm89\\Stack\\CorsService' => __DIR__ . '/..' . '/asm89/stack-cors/src/CorsService.php',
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
......@@ -3250,6 +3275,7 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'Illuminate\\View\\ViewFinderInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php',
'Illuminate\\View\\ViewName' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewName.php',
'Illuminate\\View\\ViewServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php',
'InquiryItemsSeeder' => __DIR__ . '/../..' . '/database/seeds/InquiryItemsSeeder.php',
'InquirySeeder' => __DIR__ . '/../..' . '/database/seeds/InquirySeeder.php',
'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'Laravel\\Tinker\\ClassAliasAutoloader' => __DIR__ . '/..' . '/laravel/tinker/src/ClassAliasAutoloader.php',
......@@ -5773,6 +5799,7 @@ class ComposerStaticInit14b314507a533a1b9e8248f4361c62bf
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php',
'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php',
'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'UserAddressSeeder' => __DIR__ . '/../..' . '/database/seeds/UserAddressSeeder.php',
'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
'Whoops\\Exception\\ErrorException' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/ErrorException.php',
'Whoops\\Exception\\Formatter' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Formatter.php',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment