Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

priyalaks's avatar

Laravel API -Passport or any Recommendation

I am going to write API in Laravel for an Ecommerce Platform . What would be your recommendation if I need to have security like API Keys . Previously I have worked with Passport - and it works like charm but I am open to explore others as well .

priyalaks's avatar
priyalaks's avatar priyalaks3yrs agoLaravel
3
2
Last reply by priyalaks 3yrs ago
denabyte's avatar

Vanilo "Class "Cart" not found"

I am using Vanilo 3.x trying to create an ecommerce website. Today when I tried accessing the Cart facade for the first time in the layout view of my web app like so - @if (Cart::doesNotExist()) // code @endif as detailed in the Vanilo tutorial Laravel threw a 'Class "Cart" not found' error. This makes me believe it's not recognizing Cart as a facade. I checked out th

denabyte's avatar
denabyte's avatar vincent150...3yrs agoLaravel
12
1
Last reply by vincent15000 3yrs ago
zulqarnain's avatar

Dashboard Making and CMS Building in laravel.

can anyone suggest me the best video series in laravel for backend web application development i want to make an ecommerce application and i want to build it from the scratch using laravel including dashboard and cms. can anyone suggest me the best tutorials. i also want to use Object oriented concept in this project. Thanks

zulqarnain's avatar
zulqarnain's avatar martinbean3yrs agoCode Review
6
1
Last reply by martinbean 3yrs ago
tnort's avatar

Livewire vs Inertia vs Vue/React

Hi all, Could anyone help me get what is the idea behind all these tools in relation to Vue and React, please? I understand that building Vue/React based frontend and Laravel backend seems tedious as you need to develop all these APIs. However, when it comes to Inertia or Livewire you still need to develop traditional routes which seem the same with the exception that you might

tnort's avatar
tnort's avatar Sinnbeck3yrs agoGeneral
10
9
Last reply by Sinnbeck 3yrs ago
LaraBABA's avatar

Having issue with json data saved in DB that needs to go back to vue js

Hi all, I am having an issue. I am saving an article in my db as(I encode the main article json part): $jsonEncode = json_encode($request->article); $article = Article::Create([ 'title' => $request->topic, 'article' => $jsonEncode, 'language' => $request->language, 'user_id' => Auth::id(), 'saved'

LaraBABA's avatar
LaraBABA's avatar User4768203yrs agoLaravel
7
1
Last reply by User476820 3yrs ago
arthur007's avatar

how to make an emit works instantly in laravel 9 vuejs 3?

I'm trying to get familiar with laravel9, vuejs3 and vite with a simple ecommerce website the problem is when I click add to carte its work fine but the count in icon carte incrementing but till I reload the page. this my add to carte component <template> <div class="flex items-center justify-between py-4"> <button class="

arthur007's avatar
arthur007's avatar arthur0073yrs agoVue
2
1
Last reply by arthur007 3yrs ago
rpmcmurphy's avatar

Store visitor cart data for unregistered and registered users in API, not session

Built an API for an e-commerce app. Need to store cart items while user is not logged in (guest visitors). Could be a custom table for that purpose, or something else. The issue is, what is the standard way to identify a particular visitor to store the data as there is no user_id for unregistered visitors. I will need to store both registered and unregistered user's cart info.

rpmcmurphy's avatar
rpmcmurphy's avatar rpmcmurphy3yrs agoLaravel
2
1
Last reply by rpmcmurphy 3yrs ago
kenprogrammer's avatar

NextJS for backoffice applications

If you look at NextJS docs you realize it's geared more towards public facing applications like e-commerce websites. This is due its SSR capabilities. But the example app provided by Laravel for working with NextJS and Breeze/API suggests that it can be used to develop backoffice apps. The example resembles other options for scaffolding backoffice application. https://github.c

kenprogrammer's avatar
kenprogrammer's avatar MohamedTam...3yrs agoGeneral
1
1
Last reply by MohamedTammam 3yrs ago
MooseSaid's avatar

What is the best approach for shipping address section in Laravel?

I'm building e-commerce website where i'm not handling the shipping, instead I'm sending the address details to the seller. I'm working on the shipping address form and I want to build one of those cool address forms where you get a list of all countries, once you select one it gives you a list of all cities and so on. I'm using Laravel with Inertia Vue. My questions are: 1- Wh

MooseSaid's avatar
MooseSaid's avatar martinbean3yrs agoLaravel
5
1
Last reply by martinbean 3yrs ago
Sam425's avatar

How do i add virtual try on make up feature in laravel

Hello i am creating laravel ecommerce app and i want to add the feature virtual try on like this website https://www.deborahmilano.com/en/product/makeup/lips/lipstick/red-touch-lipstick/ and i don't know it is possible and how can i do with sdk or api. Thank you for your time

Sam425's avatar
Sam425's avatar Sam4253yrs agoLaravel
2
1
Last reply by Sam425 3yrs ago
rkaalma's avatar

Laravel Vapor + DynamoDB queued Job + fetching 120 MB json feed = 413 Request Entity Too Large

I've come to a point where I kind of feel I made the wrong choice with choosing Vapor as the platform for a eCommerce API - not sure. On key part for my API is to fetch products feed from a supplier API that comes in a json format and the size of this feed is around 120 MB. Ideally I'd like the "sync" process to be a queued Job (even a Batch of Jobs - feed divided int

rkaalma's avatar
rkaalma's avatar rkaalma3yrs agoVapor
0
1
D33ts's avatar

Trying to access array offset on value of type int

Hi am new to laravel and currently following a project based course to understand about e-commerce and am facing this issue **** Trying to access array offset on value of type int **** i get this error message when i click to display subsubcategory_view page and its shows there is an error in this line <td>{{ $item['subcategory_id']['subcategory_name_en'] }}</td> *s

D33ts's avatar
D33ts's avatar D33ts3yrs agoLaravel
20
12
Last reply by D33ts 3yrs ago
jatinpr's avatar

route method not found for TypeScript based ReactJS component for Inertia

Hi, I am implementing an e-commerce application and transforming my components from JSX to TSX. I'm getting an issue with the 'route' method not being found in the TSX. Any idea how I should fix this?

jatinpr's avatar
jatinpr's avatar Sinnbeck3yrs agoInertia
5
6
Last reply by Sinnbeck 3yrs ago
joshua_bognet's avatar

"trying to access array offset on value of type null ['subtotal']".

Hello Guys i've been following this Laravel/livewire E-Commerce series and i ecountered this frustrating error. Everything seems to be oky with the code but each time i click on the place order button from my checkout page, it raises a "trying to access array offset on value of type null ['subtotal']". i really dont know what to do. i am kinda a newbie. will really

joshua_bognet's avatar
joshua_bognet's avatar joshua_bog...3yrs agoLivewire
18
1
Last reply by joshua_bognet 3yrs ago
soufianeb's avatar

Undefined array key "image"

Hello, I have a problem with my laravel project (I'm quite new to Laravel). So I'm building an e-commerce and everything was fine until i decided to add an image to my create new product. Now when I am submitting my form i have an error: Undefined array key "image". So i added a string image in my DB table so that i can save the name of my image: ​Schema::create('prod

soufianeb's avatar
soufianeb's avatar Snapey3yrs agoLaravel
2
1
Last reply by Snapey 3yrs ago
MooseSaid's avatar

How would you implement a shopping cart with Laravel and InertiaJS?

I'm trying to building e-commerce website with Laravel, Vue and InertiaJS but I'm trying to figure out what is the best way to make a shopping cart. Here are my thoughts: 1- Make it a complete client-side shopping cart with Vue Pinia without even creating an eloquent model for it. This will work by storing the user products selection in their browser and fetch them whenever the

MooseSaid's avatar
MooseSaid's avatar MooseSaid3yrs agoLaravel
38
3
Last reply by MooseSaid 3yrs ago
anton123's avatar

How to store shopping carts belonging to unregistered users?

I'm currently working on an eCommerce website and I want to allow users to order products without registering to the site. The workflow is straight forward for authenticated users, I have database tables for the shopping cart, shopping cart items etc. but I'm not sure how should I handle guests? Since I can't access their ID, should I store the data in a session or what?

anton123's avatar
anton123's avatar OussamaMat...3yrs agoLaravel
5
2
Last reply by OussamaMater 3yrs ago
nodenacci's avatar

Laravel currency conversion

I am trying to create and eCommerce website where the price of items displayed is equivalent to user location. Am currently in kenya so i expect all IP's accessing the website from kenya to view price in KES. However, all other locations that aren't Kenya to view in USD. It should be able to convert using the current existing rates. Is their a package? How do i go about it?

nodenacci's avatar
nodenacci's avatar benjamin34...3w agoLaravel
2
1
Last reply by benjamin345 3w ago
CODE-AXION's avatar

how do i get selected checkboxes values in an array?

whenever i check a box i always get 1 value at a time i want to get all the selected values, i making a ecommerce application and i want this checkboxes in shop page so user can filter out without the need of submit button so instead of working like this : 0 => 1 1 => 2 2 => 3 //these are selected values , the more you select the more array values will be added its w

CODE-AXION's avatar
CODE-AXION's avatar CODE-AXION3yrs agoLivewire
8
2
Last reply by CODE-AXION 3yrs ago
sannjay's avatar

Livewire or React Front-end, which is better for a Interactive website?

I have to build a web app with lots of filter and sorting at front end, I will also need to add small functionality like add to favorite (based on localstorage). You can imagine it like a ecommerce category pages where you filter products based on different features either by check boxes at left or dropdown at top. It will have pagination/load more as well. So based on this req

sannjay's avatar
sannjay's avatar ermunu1yr agoLivewire
9
1
Last reply by ermunu 1yr ago
BernardoBF4's avatar

Authentication for separate systems

I am currently working on a e-commerce wich has a CMS for managing content that will be shown in the site and product related configurations such as pricing, shipping, etc. In the same project I have the e-commerce itself, where clients will have to signup and login to be able to buy. The login of the CMS and of the site have different fields for login and signup; for example,

BernardoBF4's avatar
BernardoBF4's avatar Sinnbeck3yrs agoLaravel
3
1
Last reply by Sinnbeck 3yrs ago
ottz0's avatar

Multi-level nested routes and relations

I'm learning Laravel and finding it very difficult to find the right information on building a multi-level nested routes and relationships. Any resources or tutorials? How to structure the nested routes, querying by category, subcategory. Something like this would be categories->subcategories->item-list. Similar to eCommerce, blogs etc.

ottz0's avatar
ottz0's avatar JonathanAs...3yrs agoGuides
1
1
Last reply by JonathanAspeling 3yrs ago
MooseSaid's avatar

Best practice for storing products images

I'm building E-commerce website where every product can have multiple images. I'm looking for an expert opinion on how to store those images? I was thinking of making the product model 'hasMany' images and Images table will contain all images for all products and I will fetch the ones I need according to the product ID. 1- Is there a better way to do it? 2- Do you recommend sav

MooseSaid's avatar
MooseSaid's avatar tykus3yrs agoLaravel
3
1
Last reply by tykus 3yrs ago
usanzadunje's avatar

Sharing data with namespaced view

Hello guys, I am working with laravel-modules package, which provides namespaces for my views(e.g. ecommerce). I want to share data with single view which is located inside this module. I have tried: View::composer( 'ecommercegiftcards.pages.default.gift-cards', fn($view) => $view->with('giftCards', $giftCards) ); This is not working, however if I share data with

usanzadunje's avatar
usanzadunje's avatar usanzadunj...3yrs agoLaravel
3
1
Last reply by usanzadunje 3yrs ago
Sharim's avatar

Pin to Location Map to get customers address.

I'm creating an e-commerce website in Laravel. I want to add a location map where the customer can pin his address and no need to write it manually.

Sharim's avatar
Sharim's avatar MohamedTam...3yrs agoLaravel
3
1
Last reply by MohamedTammam 3yrs ago
Nihir's avatar

How to generate dynamic PDF and send that PDF to user via email?

Hi all I have an ecommerce store, and I want to send the pdf via email to user mail after the checkout success is complete. Is there any suggestion of a Package for it? Let me know if it will be helpful for me

Nihir's avatar
Nihir's avatar iftekhs3yrs agoLaravel
6
1
Last reply by iftekhs 3yrs ago
KLM113's avatar

Looking for package or ideas for a fully customizable permissions system

I developed this ecommerce system for a customer a while a go, it includes an administrative panel where an user with enough privileges can do pretty much everything in the system, CRUD products, sales, users, etc, pretty much the same that you would find in woocommerce, prestashop or any other system like those. Currently there are only 2 access levels, regular users and admin

KLM113's avatar
KLM113's avatar KLM1134yrs agoDesign
2
1
Last reply by KLM113 4yrs ago
leonnardo12's avatar

Undefined variable $products - foreach

Hi, how are you?! I am making an Ecommerce and my homepage "Welcome" should have a list of products, but I am not able to because it is giving undefined variable $products in foreach what can I do? its my foreach in welcome.blade.php @foreach($products as $product) <div class="card"> <div class="imgBox">

leonnardo12's avatar
leonnardo12's avatar leonnardo1...4yrs agoLaravel
7
3
Last reply by leonnardo12 4yrs ago
marketintelligence's avatar

Advice on how to make code abstract

We plan to link various suppliers in our system to products we have. The flow with us is that we receive an order via an ecommerce channel, we then forward the order to a supplier. Now we prefer to make it very generic, we can communicate with all those third parties and the actions we perform are always the same for every platform, for example: getOrder updateOrder updateShip

marketintelligence's avatar
marketintelligence's avatar marketinte...4yrs agoLaravel
0
1
claudio88's avatar

bumbummen99 Cart::destory on page close?

Hello, I've been working on an e-commerce site and in the end, I chose to decrease product stock once a client adds that product to the Cart and increases the product stock when they remove the product from the cart. Now this works ok, not sure if its the best option ( maybe increase / decrease once the order was placed or later when confirmed by an admin) Regardless if I choos

claudio88's avatar
claudio88's avatar vincent150...4yrs agoGeneral
1
1
Last reply by vincent15000 4yrs ago
sulaimanMisri's avatar

How would you structuring your Controller?

Hello guys. I would like to know, how you structure your Controller when it comes to large applications. Here we've got 5 features in the system with 4 roles. Features. School Management System (For admin tasks). Learning Management System. E-commerce. Forum. Blog. Roles. Admin. Teacher. Parents. Student. Each of the roles has access to all features. So how would you struct

sulaimanMisri's avatar
sulaimanMisri's avatar tisuchi4yrs agoLaravel
5
1
Last reply by tisuchi 4yrs ago
Ahmed Alaa's avatar

what's the best design for offer table in E Commerce system?

I'm building an eCommerce system with the following design Subercategories -> has many Categories -> has many Subcategories -> has many Products (product has many subcategories as well). and has also offers system with the following design Offer -> morphedByMany Subercategories, Categories, Subcategories, Products through offerable table. for each product on the web

Ahmed Alaa's avatar
Ahmed Alaa's avatar Braunson4yrs agoLaravel
1
1
Last reply by Braunson 4yrs ago
zione8036's avatar

admin auth expire

I just want to consult problem that I want to resolve. I tried to make a condition with the admin authentication. Whenever the admin auth expires, it always gives me an error message. I tried to resolve it by putting a condition that when the auth is false, it will directly route you to the dashboard, but still received that error. Whenever the admin auth expires, I have to typ

zione8036's avatar
zione8036's avatar zione80364yrs agoEnvoyer
2
1
Last reply by zione8036 4yrs ago
shahr's avatar

laravel colors filters

I have seen many e-commerce sites in which users can filter products by clicking checkboxes. for example: let's say there are different brands of mobile: like Samsung, Nokia, Company, Company, etc. Different colors, sizes, and memory. When the user checks the Samsung checkbox pages display only Samsung mobile when the user further checks the 8Gb memory checkbox, the page displa

shahr's avatar
shahr's avatar oxbir4yrs agoLaravel
17
1
Last reply by oxbir 4yrs ago
stephen waweru's avatar

Trying to access array offset on value of type null in laravel 8

In my eCommerce project, I have products with attributes and products that don't have attributes. I have been able to create a function whereby both are added to the cart and also I want them to be able to display on the cart page. I have created 2 functions in the product model that shows the product attributes only which processes the discounted prices for both types of produ

stephen waweru's avatar
stephen waweru's avatar stephen wa...4yrs agoLaravel
7
1
Last reply by stephen waweru 4yrs ago
thangarasu's avatar

How to build homepage like FlipKart and Amazon?

would like to create eCommerce websites like Flipkart and Amazon. there are more blocks in Flipkart homepage screens like one block contains banners and others have categories and products and so on. my question is that how will I maintain this on the admin side and create API for the home page screen

thangarasu's avatar
thangarasu's avatar thangarasu4yrs agoLaravel
0
1
borrie's avatar

Default value if field is empty

Hi there. I'm creating an admin panel for one of our e-commerce stores. The goal is to let the user create a discount code. If the field is left empty I want to create a random string for it. /** * Get the fields displayed by the resource. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return array */ public function fields(NovaRe

borrie's avatar
borrie's avatar borrie4yrs agoNova
1
1
Last reply by borrie 4yrs ago
Kris01's avatar

External page redirect back to my site

Hi, I'm working on the payment on an e-commerce. There is a method that creats an URL in which I need to redirect the user so he will go to an external page where he can proceed with the payment. There is a parameter, 'successUrl', in which the user after a successful payment should be returned, but nothing happens. Initially I thought that it might be because I was working lo

Kris01's avatar
Kris01's avatar Kris014yrs agoCode Review
4
1
Last reply by Kris01 4yrs ago
Kris01's avatar

Hosting Question!

Hi, I have a pretty big ecommerce, it will have enough products and different functionalities. Would a shared hosting be enough for an ecommerce, or do I need a dedicated one?

Kris01's avatar
Kris01's avatar jlrdw4yrs agoCode Review
1
1
Last reply by jlrdw 4yrs ago
Kris01's avatar

error 503 cpanel

I have a laravel built ecommerce. When I uploaded it to the server it throws error 503. What could be the problem?

Kris01's avatar
Kris01's avatar jlrdw4yrs agoCode Review
1
1
Last reply by jlrdw 4yrs ago
sanjayacloud's avatar

Need a help with "require(./app/Libraries/mpgClasses.php): failed to open stream: No such file or directory" error

Hi, I am going to integrate "https://github.com/Moneris/eCommerce-Unified-API-PHP" payment gateway to my e-commerce website. When I trying to do a transaction. It's getting below error. "require(./app/Libraries/mpgClasses.php): failed to open stream: No such file or directory" Here is my code public function paymentCheck(Request $request) {

sanjayacloud's avatar
sanjayacloud's avatar drashtantn...3yrs agoLaravel
3
1
Last reply by drashtantnayak 3yrs ago
Kris01's avatar

I need assistance with this problem

Hi guys. I have a problem. I am working on an e-commerce application and I need to calculate the shipping cost of the customer order. The shipping cost depends on the items ordered, on their width, length, height and weight. I have 5 different available packages, and I need to calculate the items ordered in which package need to go. Let's make an example. I have a package that

Kris01's avatar
Kris01's avatar Kris014yrs agoCode Review
7
1
Last reply by Kris01 4yrs ago
vlados's avatar

SEO Friendly URLs

I want to build SEO friendly URLs for ecommerce website and until now I was using https://github.com/spatie/laravel-sluggable but I want to take it even further. I want to have this structure: site.com/category1 -> CategoryController::show() site.com/category1/subcategory1 -> CategoryController::show() site.com/category1/product1 -> ProductController::show() site.

vlados's avatar
vlados's avatar Snapey1yr agoLaravel
10
1
Last reply by Snapey 1yr ago
CrastyCrap's avatar

Laravel Test

Greeting everyone, I am working on an e-commerce project this project contains multi-store accordingly to reach any store you have to call route /store_name and this store name i want to make a test to check that all store pages work fine so i make simple test to do that work public function store_main_test() { $stores = DB::table('stores')->where('activate',1)-

CrastyCrap's avatar
CrastyCrap's avatar CrastyCrap4yrs agoLaravel
2
1
Last reply by CrastyCrap 4yrs ago
nadinaa11's avatar

product categories

Hey! I am creating an ecommerce website in Laravel and my categories are not displaying correctly. There's just the list of the categories and when clicking on one of them, the url is changing depending on the slug but that's all, it is still displaying just the list. Category Controller <?php namespace App\Http\Controllers; use App\Models\Product; use App\Models\Category;

nadinaa11's avatar
nadinaa11's avatar Snapey4yrs agoLaravel
2
2
Last reply by Snapey 4yrs ago
Shalker21's avatar

3rd party api implementation

Hay, I have some questions about api consuming. What are the best way to use 3rd party apis? Using resources or services? let's say we have ecommerce shop and we need to connect to ERP system. We can create base class with all ERP provided data, and in there we connect via guzzle? Then extends that class into children classes?

Shalker21's avatar
Shalker21's avatar Snapey4yrs agoDesign
3
1
Last reply by Snapey 4yrs ago
Ifeanyichukwu's avatar

Rendering of view

Please I need an assistance. I'm building an ecommerce website but now I need to render multiple view depending on the product category or either the view the vendor chose to use for his or her page. Please how can I achieve this

Ifeanyichukwu's avatar
Ifeanyichukwu's avatar Ifeanyichu...4yrs agoCode Review
5
1
Last reply by Ifeanyichukwu 4yrs ago
niekdevvv's avatar

Multi app authentication

We are building a platform and currently have 3 apps. App 1 is a marketing app, app 2 an e-commerce app and app 3 an account/subscription management app. Each app has their own laravel api and their own nextjs frontend. Now we want a single user account for all 3 apps, so the user can login and can make calls to all 3 api's. My question is : where would we build the authenticat

niekdevvv's avatar
niekdevvv's avatar okusax4yrs agoGeneral
1
1
Last reply by okusax 4yrs ago
moritzd's avatar

Eloquent grouping across relationships

Hello all, I'm currently in the process of learning about Laravel (again) by building an e-commerce style application. I'm currently stuck on the following problem. I have three models that are associated with each other. A manufacturer, a product and categories. The relationships are set up as follows A product belongs to a category -> Category has many products A product

moritzd's avatar
moritzd's avatar undeported...4yrs agoEloquent
4
2
Last reply by undeportedmexican 4yrs ago
futurefuture's avatar

Levelling up to enterprise

Hello! Was wondering if anyone had any good resources on scaling up a medium sized Laravel-based ecommerce business to be more enterprise ready. I'm a self taught developer and though I try to learn everything that I can get my hands on, I feel like I am missing some core fundamental knowledge and best coding practice at scale, server uptime, code coverage in testing, release

futurefuture's avatar
futurefuture's avatar Sinnbeck4yrs agoGeneral
1
2
Last reply by Sinnbeck 4yrs ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.