Permalink
Browse files

Merge pull request #6 from shittyc0de/develop

Develop
  • Loading branch information...
2 parents 0ee4540 + ec1952f commit d4b520f3aa476f5599f43ac3f13f9bbd4bc13fc1 @shittyc0de committed on GitHub Feb 17, 2017
Showing with 2,659 additions and 13,617 deletions.
  1. +9 −8 app/Handlers/BootstrapDarkFixedMenuHandler.php
  2. +9 −8 app/Handlers/BootstrapDarkMenuHandler.php
  3. +9 −8 app/Handlers/BootstrapLightMenuHandler.php
  4. +12 −10 app/Handlers/L51ESKSecuredMenuHandler.php
  5. +93 −0 app/Http/Controllers/AffController.php
  6. +1 −0 app/Http/Controllers/Auth/AuthController.php
  7. +26 −0 app/Http/Controllers/CartsController.php
  8. +23 −23 app/Http/Controllers/CustomersController.php
  9. +2 −0 app/Http/Controllers/DashboardController.php
  10. +2 −17 app/Http/Controllers/HomeController.php
  11. +13 −13 app/Http/Controllers/PartnersController.php
  12. +3 −3 app/Http/Controllers/ProductsController.php
  13. +49 −1 app/Http/Controllers/SalesController.php
  14. +254 −0 app/Http/Controllers/StoreController.php
  15. +93 −0 app/Http/Controllers/StoreOrdersController.php
  16. +2 −0 app/Http/Middleware/AuthorizeRoute.php
  17. +9 −4 app/Http/routes.php
  18. +18 −0 app/Models/Affiliate.php
  19. +8 −0 app/Models/Partner.php
  20. +4 −0 app/Models/Product.php
  21. +28 −0 app/Models/StoreCustomer.php
  22. +18 −0 app/Models/StoreOrder.php
  23. +16 −0 app/Models/StoreOrderDetail.php
  24. +16 −0 app/Models/StorePartner.php
  25. +16 −0 app/Models/StorePartnerProduct.php
  26. +20 −0 app/Repositories/Criteria/Sale/SalesByShipDateAscending.php
  27. +33 −6 app/Traits/MenuHandlerTrait.php
  28. +12 −0 app/User.php
  29. +78 −0 database/migrations/2017_02_08_043115_create_store_affiliate_tables.php
  30. 0 public/assets/themes/green/css/.gitkeep
  31. +0 −3 public/assets/themes/green/css/styles.css
  32. 0 public/assets/themes/green/img/.gitkeep
  33. 0 public/assets/themes/green/js/.gitkeep
  34. 0 public/assets/themes/red/css/.gitkeep
  35. +0 −3 public/assets/themes/red/css/styles.css
  36. 0 public/assets/themes/red/img/.gitkeep
  37. 0 public/assets/themes/red/js/.gitkeep
  38. +1 −0 public/bower_components/admin-lte/build/less/header.less
  39. +2 −1 public/bower_components/admin-lte/build/less/variables.less
  40. +493 −0 public/css/404-styles.css
  41. +1 −1 public/css/all.css.map
  42. +0 −78 public/css/app.css
  43. +1 −1 public/css/app.css.map
  44. +0 −12,852 public/css/d-shop/all.css
  45. +1 −1 public/css/d-shop/all.css.map
  46. +9 −16 public/css/store.css
  47. +1 −1 public/css/store.css.map
  48. BIN public/img/banner.jpg
  49. BIN public/img/default-avatar.png
  50. BIN public/img/img-sp.png
  51. +4 −1 public/js/modal.js
  52. +9 −16 resources/assets/css/style.css
  53. +1 −1 resources/assets/css/style.css.map
  54. +15 −13 resources/assets/sass/d-shop/modules/_sections.scss
  55. +101 −81 resources/themes/default/layouts/store.blade.php
  56. +0 −1 resources/themes/default/partials/_body.blade.php
  57. +2 −2 resources/themes/default/partials/_body_left_sidebar.blade.php
  58. +2 −0 resources/themes/default/partials/_footer.blade.php
  59. +1 −1 resources/themes/default/partials/body_bottom_js/sale_forms_js.blade.php
  60. +14 −0 resources/themes/default/partials/store_banner.blade.php
  61. +54 −0 resources/themes/default/views/admin/affiliates/create.blade.php
  62. +97 −0 resources/themes/default/views/admin/affiliates/dashboard.blade.php
  63. +78 −0 resources/themes/default/views/admin/affiliates/show.blade.php
  64. +10 −10 resources/themes/default/views/admin/customers/index.blade.php
  65. +69 −69 resources/themes/default/views/admin/customers/show.blade.php
  66. +1 −1 resources/themes/default/views/admin/sales/edit.blade.php
  67. +23 −0 resources/themes/default/views/admin/sales/report.blade.php
  68. +50 −0 resources/themes/default/views/admin/store-orders/index.blade.php
  69. +149 −0 resources/themes/default/views/auth/register-customer.blade.php
  70. +16 −0 resources/themes/default/views/errors/404-old.blade.php
  71. +50 −16 resources/themes/default/views/errors/404.blade.php
  72. +67 −65 resources/themes/default/views/front/cart.blade.php
  73. +134 −48 resources/themes/default/views/front/checkout.blade.php
  74. +12 −82 resources/themes/default/views/front/index.blade.php
  75. +86 −0 resources/themes/default/views/front/member/confirm-order.blade.php
  76. +8 −0 resources/themes/default/views/front/member/profile-aff.blade.php
  77. +37 −0 resources/themes/default/views/front/member/profile-edit.blade.php
  78. +30 −0 resources/themes/default/views/front/member/profile-stock.blade.php
  79. +93 −0 resources/themes/default/views/front/member/profile.blade.php
  80. +61 −0 resources/themes/default/views/product-modal.blade.php
  81. +0 −28 resources/themes/green/config.php
  82. +0 −43 resources/themes/green/partials/_body.blade.php
  83. +0 −5 resources/themes/green/partials/_theme_head.blade.php
  84. +0 −28 resources/themes/red/config.php
  85. +0 −43 resources/themes/red/partials/_body.blade.php
  86. +0 −5 resources/themes/red/partials/_theme_head.blade.php
@@ -19,14 +19,15 @@ class BootstrapDarkFixedMenuHandler implements MenuHandlerInterface
// TODO: RenderLeftAlignmentGroup
// TODO: RenderRightAlignmentGroup
- public $MENU_PARTIAL_VIEW = 'partials._bootstrap-dark-fixed-menu';
- public $MENU_HEADER = "<ul class='nav navbar-nav'>";
- public $MENU_FOOTER = "</ul>";
- public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
- public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
- public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='sr-only'>(current)</span></a></li>";
- public $MENU_GROUP_START = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
- public $MENU_GROUP_END = "</ul></li>";
+ public $MENU_PARTIAL_VIEW = 'partials._bootstrap-dark-fixed-menu';
+ public $MENU_HEADER = "<ul class='nav navbar-nav'>";
+ public $MENU_FOOTER = "</ul>";
+ public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
+ public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
+ public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='sr-only'>(current)</span></a></li>";
+ public $MENU_GROUP_START_OPENED = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
+ public $MENU_GROUP_START_CLOSED = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
+ public $MENU_GROUP_END = "</ul></li>";
public $TRAIL_PARTIAL_VIEW = 'partials._bootstrap-light-trail';
public $TRAIL_HEADER = "<ol class='breadcrumb'>";
@@ -19,14 +19,15 @@ class BootstrapDarkMenuHandler implements MenuHandlerInterface
// TODO: RenderLeftAlignmentGroup
// TODO: RenderRightAlignmentGroup
- public $MENU_PARTIAL_VIEW = 'partials._bootstrap-dark-menu';
- public $MENU_HEADER = "<ul class='nav navbar-nav'>";
- public $MENU_FOOTER = "</ul>";
- public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
- public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
- public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='sr-only'>(current)</span></a></li>";
- public $MENU_GROUP_START = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
- public $MENU_GROUP_END = "</ul></li>";
+ public $MENU_PARTIAL_VIEW = 'partials._bootstrap-dark-menu';
+ public $MENU_HEADER = "<ul class='nav navbar-nav'>";
+ public $MENU_FOOTER = "</ul>";
+ public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
+ public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
+ public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='sr-only'>(current)</span></a></li>";
+ public $MENU_GROUP_START_OPENED = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
+ public $MENU_GROUP_START_CLOSED = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
+ public $MENU_GROUP_END = "</ul></li>";
public $TRAIL_PARTIAL_VIEW = 'partials._bootstrap-light-trail';
public $TRAIL_HEADER = "<ol class='breadcrumb'>";
@@ -19,14 +19,15 @@ class BootstrapLightMenuHandler implements MenuHandlerInterface
// TODO: RenderLeftAlignmentGroup
// TODO: RenderRightAlignmentGroup
- public $MENU_PARTIAL_VIEW = 'partials._bootstrap-light-menu';
- public $MENU_HEADER = "<ul class='nav navbar-nav'>";
- public $MENU_FOOTER = "</ul>";
- public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
- public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
- public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='sr-only'>(current)</span></a></li>";
- public $MENU_GROUP_START = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
- public $MENU_GROUP_END = "</ul></li>";
+ public $MENU_PARTIAL_VIEW = 'partials._bootstrap-light-menu';
+ public $MENU_HEADER = "<ul class='nav navbar-nav'>";
+ public $MENU_FOOTER = "</ul>";
+ public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
+ public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
+ public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='sr-only'>(current)</span></a></li>";
+ public $MENU_GROUP_START_OPENED = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
+ public $MENU_GROUP_START_CLOSED = "<li class='dropdown'><a href='@URL@' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'><i class='@ICON@'></i>&nbsp;@LABEL@<span class='caret'></span></a><ul class='dropdown-menu'>";
+ public $MENU_GROUP_END = "</ul></li>";
public $TRAIL_PARTIAL_VIEW = 'partials._bootstrap-light-trail';
public $TRAIL_HEADER = "<ol class='breadcrumb'>";
@@ -28,14 +28,16 @@ class L51ESKSecuredMenuHandler implements MenuHandlerInterface
getLeafMenuItem as traitGetLeafMenuItem;
}
- public $MENU_PARTIAL_VIEW = 'partials._adminlte-menu-sidebar';
- public $MENU_HEADER = "";
- public $MENU_FOOTER = "";
- public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
- public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;<span>@LABEL@</span></a></li>";
- public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;<span>@LABEL@</span><span class='sr-only'>(current)</span></a></li>";
- public $MENU_GROUP_START = "<li class='treeview'><a href='@URL@'><i class='@ICON@'></i><span>@LABEL@</span><i class='fa fa-angle-left pull-right'></i></a><ul class='treeview-menu'>";
- public $MENU_GROUP_END = "</ul></li>";
+ public $MENU_PARTIAL_VIEW = 'partials._adminlte-menu-sidebar';
+ public $MENU_HEADER = "";
+ public $MENU_FOOTER = "";
+ public $MENU_ITEM_SEPARATOR = "<li role='separator' class='divider'></li>";
+ public $MENU_ITEM_INACTIVE = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;<span>@LABEL@</span></a></li>";
+ public $MENU_ITEM_ACTIVE = "<li class='active'><a href='@URL@'><i class='@ICON@'></i>&nbsp;<span>@LABEL@</span><span class='sr-only'>(current)</span></a></li>";
+ public $MENU_GROUP_START = "<li class='treeview'><a href='@URL@'><i class='@ICON@'></i><span>@LABEL@</span><i class='fa fa-angle-left pull-right'></i></a><ul class='treeview-menu'>";
+ public $MENU_GROUP_START_OPENED = "<li class='treeview active'><a href='@URL@'><i class='@ICON@'></i><span>@LABEL@</span><i class='fa fa-angle-down pull-right'></i></a><ul class='treeview-menu menu-open'>";
+ public $MENU_GROUP_START_CLOSED = "<li class='treeview'><a href='@URL@'><i class='@ICON@'></i><span>@LABEL@</span><i class='fa fa-angle-left pull-right'></i></a><ul class='treeview-menu'>";
+ public $MENU_GROUP_END = "</ul></li>";
public $TRAIL_PARTIAL_VIEW = 'partials._bootstrap-light-trail';
public $TRAIL_HEADER = "<ol class='breadcrumb'>";
@@ -46,12 +48,12 @@ class L51ESKSecuredMenuHandler implements MenuHandlerInterface
public $TRAIL_ITEM_INACTIVE_WITH_URL = "<li><a href='@URL@'><i class='@ICON@'></i>&nbsp;@LABEL@</a></li>";
- public function renderMenuItem( Menu $item, $variables = [] )
+ public function renderMenuItem( Menu $item, $variables = [], $menuBranch = [] )
{
$itemContent = "";
if ($this->currentUserIsAuthorized($item)) {
- $itemContent = $this->traitRenderMenuItem($item, $variables);
+ $itemContent = $this->traitRenderMenuItem($item, $variables, $menuBranch);
}
return $itemContent;
@@ -0,0 +1,93 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+use App\Http\Requests;
+use App\Http\Controllers\Controller;
+
+use App\User;
+use App\Models\Affiliate;
+use App\Models\StoreCustomer;
+use Auth;
+use DB;
+
+use App\Models\Role;
+
+class AffController extends Controller
+{
+ static function routes() {
+ \Route::get('aff/{link}', 'AffController@affClicked');
+ \Route::group(['prefix' => 'affiliate'], function () {
+ \Route::get( '/', 'AffController@dashboard')->name('admin.affiliate.dashboard');
+ \Route::get( '/create', 'AffController@create') ->name('admin.affiliate.create');
+ \Route::get( '/{id}', 'AffController@show') ->name('admin.affiliate.show');
+ \Route::post( '/', 'AffController@store') ->name('admin.affiliate.store');
+ });
+ }
+
+ public function dashboard() {
+ // get all the affiliator users
+ // $affiliators = Role::with('users')->where('name', 'affiliator')->get();
+ // $affiliators = Role::where('name', 'affiliator')->first()->users()->get();
+ $affiliators = Affiliate::with('user')->get();
+ return view('admin.affiliates.dashboard', compact('affiliators'));
+ }
+
+ public function affClicked(Request $request, $link) {
+ // get visitor ip
+ $visitorIp = $request->ip();
+ $long = ip2long($visitorIp); // convert it to long so we can store it in database - convert it using long2ip to see the actual ip address
+ // try to get ip from database
+ $check = DB::table('ip_addresses')->where(['link' => $link, 'ip' => $long])->first();
+ // check whether the ip is exists in database or not
+ if (null == $check) {
+ $saveIp = DB::table('ip_addresses')->insert([
+ 'ip' => $long,
+ 'link' => $link
+ ]);
+ $aff = Affiliate::where('link', $link)->increment('click');
+ }
+ session()->put('aff_link', $link);
+ return redirect('/store');
+ }
+
+ public function create() {
+ return view('admin.affiliates.create');
+ }
+
+ public function show($id) {
+ $user = User::find($id);
+ return view('admin.affiliates.show', compact('user'));
+ }
+
+ public function store(Request $request) {
+ // create user
+ $user = User::create([
+ 'first_name' => $request->firstname,
+ 'last_name' => $request->lastname,
+ 'username' => $request->username,
+ 'email' => $request->email,
+ 'password' => $request->password,
+ 'enabled' => true
+ ]);
+
+ // assign role affiliator to user
+ $user->attachRole(18);
+
+ // get 5 random string
+ $arr = str_split('abcdefghijklmnopqrstuvwxyz0123456789'); // get all the characters into an array
+ shuffle($arr); // randomize the array
+ $arr = array_slice($arr, 0, 5); // get the first six (random) characters out
+ $randomStr = implode('', $arr);
+
+ // create affiliate based on user
+ $cust = Affiliate::create([
+ 'user_id' => $user->id,
+ 'link' => $randomStr
+ ]);
+
+ return redirect('admin/affiliate');
+ }
+}
@@ -99,6 +99,7 @@ public function postLogin(Request $request)
Audit::log(Auth::user()->id, trans('general.audit-log.category-login'), trans('general.audit-log.msg-login-success', ['username' => $user->username]));
Flash::success("Welcome " . Auth::user()->first_name);
+ flash()->overlay('Notice', 'You are now a Laracasts member!');
return redirect()->intended($this->redirectPath());
}
else
@@ -0,0 +1,26 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+use Cart;
+
+use App\Http\Requests;
+use App\Http\Controllers\Controller;
+
+class CartsController extends Controller
+{
+ static function routes() {
+ \Route::group(['prefix' => 'cart'], function () {
+ \Route::post('/', 'CartsController@store')->name('store.cart.store');
+ });
+ }
+
+ public function store(Request $request) {
+ dd($request);
+ Cart::add([
+
+ ])
+ }
+}
@@ -66,21 +66,21 @@ public function export($id) {
public function exportSales($id) {
Excel::create('Customer', function($excel) use($id) {
$excel->sheet('Customer', function($sheet) use($id) {
- $sales = $this->sale->findAllBy('customer_id', $id);
- $customerName = $this->customer->findBy('id', $id)->name;
+ $sales = $this->sale->findAllBy('customer_id', $id);
+ $customerName = $this->customer->findBy('id', $id)->name;
$sheet->loadView('admin.customers.excel-sales', ['sales' => $sales,'id'=>$id,'name'=>$customerName]);
});
})->download('xls');
}
public function indexByType($id)
{
- $tipe = $id;
- $customers = $this->customer->pushCriteria(new CustomerByCreatedDescending())->findWhere(['type' => $id]);
-
- $type = Helpers::getCustomerTypeDisplayName($id);
-
- $page_title = trans('admin/customers/general.page.index.title');
+ $tipe = $id;
+ $customers = $this->customer->pushCriteria(new CustomerByCreatedDescending())->findWhere(['type' => $id]);
+
+ $type = Helpers::getCustomerTypeDisplayName($id);
+
+ $page_title = trans('admin/customers/general.page.index.title');
$page_description = trans('admin/customers/general.page.index.description', ['type' => $type]);
return view('admin/customers/index', compact('customers', 'page_title', 'page_description', 'tipe'));
@@ -121,10 +121,10 @@ public function store(Request $request)
*/
public function show($id)
{
- $customer = $this->customer->pushCriteria(new CustomersWithFollowups())->find($id);
- $sales = $this->sale->pushCriteria(new SalesByOrderDateDescending())->findWhere(['customer_id' => $id]);
-
- $page_title = trans('admin/customers/general.page.show.title');
+ $customer = $this->customer->pushCriteria(new CustomersWithFollowups())->find($id);
+ $sales = $this->sale->pushCriteria(new SalesByOrderDateDescending())->findWhere(['customer_id' => $id]);
+
+ $page_title = trans('admin/customers/general.page.show.title');
$page_description = trans('admin/customers/general.page.show.description', ['name' => $customer->name]);
return view('admin.customers.show', compact('customer', 'page_title', 'page_description', 'sales'));
@@ -182,13 +182,13 @@ public function destroy($id)
*/
public function getModalDelete($id)
{
- $error = null;
-
- $customer = $this->customer->find($id);
-
+ $error = null;
+
+ $customer = $this->customer->find($id);
+
$modal_title = trans('admin/customers/dialog.delete-confirm.title');
$modal_route = route('admin.customers.delete', array('id' => $customer->id));
- $modal_body = trans('admin/customers/dialog.delete-confirm.body', ['id' => $customer->id, 'full_name' => $customer->name]);
+ $modal_body = trans('admin/customers/dialog.delete-confirm.body', ['id' => $customer->id, 'full_name' => $customer->name]);
return view('modal_confirmation', compact('error', 'modal_route', 'modal_title', 'modal_body'));
@@ -213,17 +213,17 @@ public function updateStatus($id)
public function search(Request $request) {
$return_arr = null;
-
- $query = $request->input('term');
-
- $customers = $this->customer->pushCriteria(new CustomerWhereNameLike($query))->all();
+
+ $query = $request->input('term');
+
+ $customers = $this->customer->pushCriteria(new CustomerWhereNameLike($query))->all();
foreach ($customers as $c) {
$id = $c->id;
$name = $c->name;
$address = $c->address;
$laundry_address = $c->laundry_address;
- $ship_address = $c->send_address;
+ $ship_address = $c->send_address;
$phone = $c->phone;
$type = $c->type;
@@ -235,7 +235,7 @@ public function search(Request $request) {
'phone' => $phone,
'address' => $address,
'laundry_address' => $laundry_address,
- 'ship_address' => $ship_address
+ 'ship_address' => $ship_address
];
$return_arr[] = $entry_arr;
}
@@ -123,6 +123,8 @@ public function index() {
$page_title = "Dashboard";
$page_description = "This is the dashboard";
+ flash('Welcome Aboard!');
+
return view('dashboard', compact(
'page_title',
'page_description',
@@ -34,7 +34,7 @@ public function __construct(Route $route, Permission $permission)
public function index() {
- $homeRouteName = 'login';
+ $homeRouteName = 'store.front';
try {
$user = Auth::user();
@@ -48,7 +48,7 @@ public function index() {
} else {
// TODO: create check if the user is outlet owner,
// and redirect to it's dashboard.
- $homeRouteName = 'welcome';
+ $homeRouteName = 'store.front';
}
}
// $homeCandidateName = config('app.home_route');
@@ -58,19 +58,4 @@ public function index() {
return \Redirect::route($homeRouteName);
}
-
- public function storeFront() {
- $node = \App\Models\Category::where('slug', 'chemical-laundry')->first();
- // return view('test_custom_variables', compact('node'));
- return view('front.index', compact('node'));
- }
-
- public function storeCart() {
- return view('front.cart');
- }
-
- public function checkout() {
- return view('front.checkout');
- }
-
}
Oops, something went wrong.

0 comments on commit d4b520f

Please sign in to comment.