Projects - Mini Ecommerce

Tips and posts related to ecommerce

 

Adding all menus with their matching routes

From previous post now its time to add menus in our layout. But before that we need to create Profile...


Protecting all menus based on admin or customer role

Step 01: Changing in app.blade.php like following @if(auth()->user()->role_id == 1) {{ __('Users') }} {{ __('Products') }} {{ __('Profile') }} {{...


Listing rows of users - crud

Step 01: Adding jQuery with npm npm i jquery Step 02: Using bootstrap 5 icons //Installing bootstrap 5 icons with...


Adding user data - crud of users

Step 01: Adding user add button just above of table element in list of users All Users Add User Step...


Editing user data - crud of users

Step 01: In UserController, adding edit() method  public function edit( User $user ) { $meta_title = 'Edit User ' ....


Deleting user data - crud of users

Step 01: In UserController, adding destroy() method public function destroy( User $user ) { $user->delete(); return redirect()->route( 'users.index' )->with( 'success',...


Searching user data - crud of users

Step 01: Adding search form just above table element in list.blade.php under resources/view/users All Users Add User Step 02: Then,...


Listing rows of products - crud

Step 01: Changing index() method in ProductController public function index( Request $request ) { $meta_title = 'All Products'; $query =...


Adding product data - crud of products

Step 01: Adding product add button just above of table element in list of products All Products Add Product Step...


Editing product data - crud of products

Step 01: In ProductController, adding edit() method public function edit( Product $product ) { $meta_title = 'Edit Product ' ....