Issue #840 fixed
This commit is contained in:
parent
f9e174ea70
commit
c585186a88
|
|
@ -21,12 +21,13 @@ class CustomerDataGrid extends DataGrid
|
|||
|
||||
public function prepareQueryBuilder()
|
||||
{
|
||||
$queryBuilder = DB::table('customers as custs')
|
||||
->addSelect('custs.id as customer_id', 'custs.email', 'cg.name')
|
||||
->addSelect(DB::raw('CONCAT(custs.first_name, " ", custs.last_name) as full_name'))->leftJoin('customer_groups as cg', 'custs.customer_group_id', '=', 'cg.id');
|
||||
$queryBuilder = DB::table('customers')
|
||||
->leftJoin('customer_groups', 'customers.customer_group_id', '=', 'customer_groups.id')
|
||||
->addSelect('customers.id as customer_id', 'customers.email', 'customer_groups.name')
|
||||
->addSelect(DB::raw('CONCAT(customers.first_name, " ", customers.last_name) as full_name'));
|
||||
|
||||
$this->addFilter('customer_id', 'custs.id');
|
||||
$this->addFilter('full_name', DB::raw('CONCAT(custs.first_name, " ", custs.last_name)'));
|
||||
$this->addFilter('customer_id', 'customers.id');
|
||||
$this->addFilter('full_name', DB::raw('CONCAT(customers.first_name, " ", customers.last_name)'));
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ class AdminServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
// include __DIR__ . '/../Http/routes.php';
|
||||
$this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
|
||||
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'admin');
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
<div class="page-content">
|
||||
@inject('customerGrid','Webkul\Admin\DataGrids\CustomerDataGrid')
|
||||
|
||||
{!! $customerGrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use Webkul\Core\Repositories\SliderRepository;
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->route('any'))
|
||||
if (request()->route()->getName() != 'shop.home.index')
|
||||
abort(404);
|
||||
|
||||
$currentChannel = core()->getCurrentChannel();
|
||||
|
|
|
|||
|
|
@ -275,5 +275,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
});
|
||||
//customer routes end here
|
||||
|
||||
Route::get('/{any?}', 'Webkul\Shop\Http\Controllers\HomeController@index');
|
||||
// Route::get('/{any?}', 'Webkul\Shop\Http\Controllers\HomeController@index');
|
||||
|
||||
Route::fallback('Webkul\Shop\Http\Controllers\HomeController@index');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class ShopServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot(Router $router)
|
||||
{
|
||||
include __DIR__ . '/../Http/routes.php';
|
||||
$this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
|
||||
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'shop');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue