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

Kenneth_H's avatar

Eager Loading parent categories

Hi So I am building a small scale ecommerce application where I want to eager load the parent category if it exists. I am already eager loading metadata as this is needed everywhere where I use the category and I am using the $with protected field on the model for that. However, I am facing an issue when I try to do this with a category that is a root category, which means that

Kenneth_H's avatar
Kenneth_H's avatar Snapey8yrs agoEloquent
8
1
Last reply by Snapey 8yrs ago
stebrl's avatar

Best practice?

So, I'm starting a new Laravel project for my company (Apple reseller) where I have to import lots of CSV files from different distributors, which include thousands of products. All these products need to be updated a few times everyday (in-stock counter, price, ...) with a cron job (task scheduler). On a frontend I'm selecting product categories which I want to filter when imp

stebrl's avatar
stebrl's avatar EventFello...8yrs agoLaravel
4
1
Last reply by EventFellows 8yrs ago
iamjaredsimpson's avatar

Database table setup for storing product attributes

I'm building an ecommerce website that can have a bunch of products of varying categories. I'm trying to come up with a way to store different product attributes. My definition of attributes would be the type of details you see in the amazon sidebar when searching for products. An example would be something like a hard drive has different manufactures, price points, storage siz

iamjaredsimpson's avatar
iamjaredsimpson's avatar iamjaredsi...9yrs agoGeneral
0
1
shinigaimi's avatar

Share Wordpress login with Laravel

Hey all, I am trying to share login credentials between WordPress and laravel, I found a project called corcel but I didn't see if it shared logins. I am creating an eCommerce site that has a shopping cart etc

shinigaimi's avatar
shinigaimi's avatar shinigaimi9yrs agoGeneral
3
1
Last reply by shinigaimi 9yrs ago
mikefolsom's avatar

Queues: Two Apps, Two Domains, One Server, One Database

I have just transferred the hosting of two Laravel apps (two separate domains) to run on a single DigltalOcean server, provisioned by Forge: one is an administrative panel and the other is a branded consumer-facing e-commerce site (possibly the first of several distinctly-branded sites). The sites share a common database. We have historically been using a lot of scheduled comma

mikefolsom's avatar
mikefolsom's avatar Soubhagya3yrs agoForge
3
1
Last reply by Soubhagya 3yrs ago
helpmyworld's avatar

Models and Controllers

Good day. I am building a eCommerce system that has categories. Also this system will allow me to blog. In the app folder i will have two categories one for the blog one for the products. Is it workable to have two (files with the same name doing different things.)categories in the model folder(app)? In the controllers also, should i have to CategoriesControllers? one for pos

helpmyworld's avatar
helpmyworld's avatar helpmyworl...9yrs agoLaravel
6
1
Last reply by helpmyworld 9yrs ago
Kaustubh's avatar

How to use Magento in Laravel

I am making ecommerce project in laravel. I want to know that, can i use magento in laravel.

Kaustubh's avatar
Kaustubh's avatar topvillas9yrs agoLaravel
1
1
Last reply by topvillas 9yrs ago
helpmyworld's avatar

Blog and E commerce

Good day, i am learning laravel, i just created blog functionalities. I want to know if it is easily possible to put eCommerce functions(Buy, order, cart...) into my blog? I am an author, i want people to buy by books online through my blog. i do not want a complete set of online store. Where do i begin and how?

helpmyworld's avatar
helpmyworld's avatar helpmyworl...9yrs agoLaravel
0
1
Kaustubh's avatar

Laravel Magento

I am making ecommerce website and i want to know can i integret magento in laravel. If yes then how can i use magento in laravel.

Kaustubh's avatar
Kaustubh's avatar troongizmo9yrs agoLaravel
1
1
Last reply by troongizmo 9yrs ago
shinigaimi's avatar

Wordpress + Laravel Backend ??

Hey Guys, I am in the process of setting up an eCommerce store on a WordPress for the e-commerce and Laravel for the backend only accessible for people with active subscriptions, I am having the hardest time figuring out how to use Laravel auth system vs WordPress but have laravel check to make sure user has active sub. I found that laracast has a system on accepting payments h

shinigaimi's avatar
shinigaimi's avatar shinigaimi9yrs agoLaravel
0
1
tanmay_das's avatar

Equivalent Eloquent query

Consider the following three tables: items (id, name, description, subcategory_id) categories (id, name) subcategories (id, name, category_id) I am trying to implement a search functionality for my first Laravel e-commerce project. I am asking the user to provide two things to run a search: a) The query string b) The category (not subcategory) If I had the category_id in my i

tanmay_das's avatar
tanmay_das's avatar tanmay_das9yrs agoEloquent
4
1
Last reply by tanmay_das 9yrs ago
vinsonyung's avatar

Is it appropriate to create method in model like this...

Hi Laravers, I am building a small eCommerce application. In order to log order cancel reason, I added a method createCancelLog() in App\Order model class Order extends Model { ... public function cancelLog() { $this->hasOne(OrderCancelLog::class); } public function createCancelLog($request) { $this->cancelLog->create([

vinsonyung's avatar
vinsonyung's avatar martinbean9yrs agoLaravel
4
1
Last reply by martinbean 9yrs ago
Screenbeetle's avatar

Advice please on how to test real order data (to check that it tallies correctly)

I'm building an ecommerce app (Laravel 5.3) that is replacing one I originally built in Zend. The order data is being sucked in from the old app via seeds. These seeds are having to populate various new fields including an 'order_total' (which stupidly didn't exist in the old app) as well as fields like pre_discount_total and post_discount_total. What I would like to do is run

Screenbeetle's avatar
Screenbeetle's avatar ohffs9yrs agoTesting
3
11
Last reply by ohffs 9yrs ago
MrRobot21's avatar

Best Practice To Manage Laravel 5.4 API With Existing Web

Hi Awesome People I'm working on an e-commerce project using laravel-vue for website and laravel-api for mobile application, i wanted suggestion on the best way to manage api part or the best way to implement the project these are my thoughts on implementing this 1->using same controller for both api and web, but worried abut complex logic and scalability public function

MrRobot21's avatar
MrRobot21's avatar MrRobot219yrs agoLaravel
2
1
Last reply by MrRobot21 9yrs ago
ouarech's avatar

Credit Card Payment implementation with Angular 1.5.8 and Laravel 5.3

Hi, We developed an e-Commerce using Angular 1.5.8 on Node JS and Laravel 5.3 on Apache. The communication between them is done via JSon Web Serviceces. Now we would like to develop the Payment part for Credit Card but our Payment Providers in our Country does not seem to provide plugins for Angular but only for PHP. So, what is your advise? should we show the payment page from

ouarech's avatar
ouarech's avatar ouarech9yrs agoLaravel
0
1
MrRobot21's avatar

Laravel Vue Shopping Cart

Hi Awesome People I'm working on a e-commerce project, i'm building the api in Laravel for Mobile Apps and for the web app, i'm using vue-cli for web app since the api is stateless which uses passport to authenticate user, i couldn't figure out the best way to create the cart functionality with the session and all 1 -> should i create a cart table in database and CRUD the ca

MrRobot21's avatar
MrRobot21's avatar Codeskills9yrs agoLaravel
5
1
Last reply by Codeskills 9yrs ago
shinigaimi's avatar

Laravel and Wordpress

Hey all, I am in the process of setting up an e-commerce store via WordPress and a dashboard created via Laravel for the dashboard. My question is what do you guys would be the best way to accomplish this? to piggyback off from the WordPress login system to authenticate and handle that aspect to either grant or deny access to dashboard features. I am very new to Laravel and st

shinigaimi's avatar
shinigaimi's avatar bashy9yrs agoLaravel
2
1
Last reply by bashy 9yrs ago
iGenezys's avatar

Omnipays - Questions

Hi. I created a e-commerce website, and naturally, I want to make the payment. I didn't know where to go, so I choose Omnipay, there was a tutorial, I tried this. Actually I just want to make the PayPal Payment, and next, I'll maybe need some other informations. But now, I have an error. By following the tutorial, I make this code : use Omnipay\Omnipay; $gateway = Omnipay::cre

iGenezys's avatar
iGenezys's avatar iGenezys9yrs agoLaravel
0
1
LaraStorm's avatar

How to pass form input value to the model ?

hi guys i have developed an ecommerce site when we are adding product to the cart now its adding as 1 qty since i don't have qty input and this is my add to cart function in shop model public function add($item,$id) { $storedItem =['qty' => 0, 'price' => $item->price, 'item' => $item]; if($this->items) { if(array_key_exists($id,$this->items)) {

LaraStorm's avatar
LaraStorm's avatar tehseen7yrs agoLaravel
3
1
Last reply by tehseen 7yrs ago
killerbeast2017's avatar

Performing Arithmetic Operations inside Laravel Controller

I am writing an APIs in Laravel for an ecommerce site. I need to pass on data as JSON. I can pass the list of all items in the user's cart. I also need to pass the total amount as a separate object in my JSON. The below is my code that doesn't work: $items = Cart_Item::where('user_id', $user->id); $total = 0; $items = $items->map(function ($item, $key) {

killerbeast2017's avatar
killerbeast2017's avatar yeshwanthv...9yrs agoLaravel
2
1
Last reply by yeshwanthvshenoy 9yrs ago
Gatemark's avatar

Best Advice on Bandwidth on SPA or NON-SPA with Vue.JS

hello am thinking on whether i should make my website single page application and make laravel be the API backend. My assumption is that, SPA is large for my bandwidths, ie adding all components at vue-router, while my latter option is to make laravel serve individual page as Vue application from individual route in web.php. Another option crossed my mind i should make laravel

Gatemark's avatar
Gatemark's avatar Gatemark9yrs agoGeneral
0
1
Hadrien's avatar

Attributes for products

Hello, I'm creating a small website for myself to show some digital products. Each product belongs to a category, and a category has many products. Every category has specific attributes. For example, a HTML website may be retina ready, responsive… A WordPress website may be retina and responsive too, but also support some plugins. I have created a migration, but I'm not sure i

Hadrien's avatar
Hadrien's avatar mcenroe9yrs agoCode Review
1
1
Last reply by mcenroe 9yrs ago
mehedi's avatar

Synchronize data on my Database

Hello ! I have a eCommerce sites order API. Which is a long JSON Object . Every day it will be updated. I mean some new data append this JSON Object. My question is how can i insert this data on my other database table. It contain various data field but order ID is Unique on every row . I actually want to synchronizing data to this API and my database table. How can i do this p

mehedi's avatar
mehedi's avatar hajrovica9yrs agoEloquent
1
1
Last reply by hajrovica 9yrs ago
DavidSaint's avatar

Layers of hasManyThrough()

Hi I am building an e-commerce site that has models like Products, Options, Options Values, Images.... Products has Many Options (like color, size....) Products has Many Options Values (like red, blue, S, M, L) through Options Options has Many Options Values Options Values has Many Images Can I own say... Products has Many Images through Options Values OR how do I do this And

DavidSaint's avatar
DavidSaint's avatar jlrdw9yrs agoEloquent
2
1
Last reply by jlrdw 9yrs ago
LaraStorm's avatar

Laravel with 2Checkout

Hi anyone here used 2checkout with laravel ? i'm doing an ecommerce site i need to integrate 2checkout with laravel 5.4 any help ? Thank you

LaraStorm's avatar
LaraStorm's avatar tisuchi9yrs agoLaravel
1
1
Last reply by tisuchi 9yrs ago
joe.ainsworth's avatar

Review my logic within view, should I extract?!

As a bit of a newcomer to MVC architecture I understand I should have no logic in my views. I am testing my skills by writing a basic ecommerce application. I have created a quantity selector in my bag which is displayed for each product. Eventually I will link it up to some AJAX to allow customers to change the quantity within the bag area. At the moment I have the below logic

joe.ainsworth's avatar
joe.ainsworth's avatar jekinney9yrs agoCode Review
4
1
Last reply by jekinney 9yrs ago
maxccarvalho's avatar

Multiple Vue instances

Hi, I'm migrating a big e-commerce application to Vue and I have some questions. The current code base has lots of js in line code, a mix of libs (jQuery and PrototypeJS). I'll move everything to Vue and ES6 but, til then I need to keep the things working and adding Vue step by step. So, I now that I can create multiple instances pointing to multiple root elements. But, what to

maxccarvalho's avatar
maxccarvalho's avatar hendranucl...9yrs agoVue
5
1
Last reply by hendranucleo 9yrs ago
23andreas's avatar

Calculating income each day for past 7 days

Hello. I'm currently working on displaying the income for an e-commerce site the past 7 days in a chart. Orders are stored in a table called orders. Orders contains a column called itemID referring to a table called items. Items table contains a price column. Each order can only have one item. My order model has a function like this public function item(){ return $this-

23andreas's avatar
23andreas's avatar Swaz9yrs agoEloquent
3
1
Last reply by Swaz 9yrs ago
MrRobot21's avatar

Laravel + Vue or Jsut VueCli App for a website

Hi awesome people i want to build an E-commerce Website, i'm confused which method to follow for best and efficient performance and scalability of the website 1-> Should i create a Laravel API(only api no views) separately so that the mobile apps and Vue or Angular apps can build on top of it 2-> Should i use Vue with laravel for website and an API for mobile apps i'm c

MrRobot21's avatar
MrRobot21's avatar MrRobot219yrs agoLaravel
0
1
amitshrestha221's avatar

How to setup my database?

I am doing an E-commerce project. During the add product form I have this form <form class="form-horizontal adminex-form" method="post" action="{{ route('coupons.addSubmit') }}"> <div class="form-group"> <label class="col-sm-2 col-sm-2 control-label">Product Name<

amitshrestha221's avatar
amitshrestha221's avatar amitshrest...9yrs agoLaravel
3
1
Last reply by amitshrestha221 9yrs ago
Lebod's avatar

Recommendations for Live Chat on L5.3?

Hi everyone, We're looking to add Live Chat functionality to our L5.3 e-commerce app. I was wondering if you guys would have a recommendation for us? Would you recommend using a 3rd party Live Chat application or having one developed? I've seen some packages that are out there that might make development a little more feasible but I'm not sure at this point... Thank you.

Lebod's avatar
Lebod's avatar joann12237yrs agoGeneral
10
1
Last reply by joann1223 7yrs ago
eddy1992's avatar

How to accept and validate form ?

Hi I am building an ecommerce website and I am writing api's for it. Now I have many products and each product has an unique id, for example apple has product_id = 1 and then orange has a product_id = 2 and so on. So I am writing an api to place an order and the behavior of the api would be that it would accept number of product_id's and their quantities and then place order.

eddy1992's avatar
eddy1992's avatar eddy19929yrs agoLaravel
2
1
Last reply by eddy1992 9yrs ago
sabeena's avatar

Sending Email in Laravel

Hi all, i am newbie to laravel, i want to develop email module in laravel it can be used thoughout the application. say, ecommerce website it will send mail while registration. while order the goods, etc, i need an advice regarding is saving html mail body in DB is good over creating mail body as view? which laravel functionality is good to implement sending mail module though

sabeena's avatar
sabeena's avatar sabeena9yrs agoTips
6
1
Last reply by sabeena 9yrs ago
nicktr's avatar

Guidance on Category management

I'm at the early stages of a project and i'm trying to figure out the best way to go about category management. I'm building an e-commerce platform for antiques. There's a large number of categories, about 400, going up to 3 levels deep, (root level plus 2 child levels), so a nested tree. I've searched and found some packages that provide functionality around what i need. Prima

nicktr's avatar
nicktr's avatar nicktr9yrs agoLaravel
2
1
Last reply by nicktr 9yrs ago
megamitch's avatar

Full text search, search from multiple tables

I'm building a small ecommerce app and I'm trying to implement a full text search (product search) but having trouble where to start because the search function should search from the 3 tables. I have 3 tables named 'categories, tags and items'. Surely I can use 'LIKE' query in each table query like, $items = items::where('item_name','LIKE', $request->search)->get(); $ite

megamitch's avatar
megamitch's avatar maxnb9yrs agoEloquent
1
1
Last reply by maxnb 9yrs ago
hauwa's avatar

"Wordpress like" Taxonomy in Laravel 5.3

Hi, I'm working on an ecommerce website that also has a blog. I have a posts table and a products table. My problem is the taxonomy for the product's tags and categories aswell as that of the posts. Creating two tags table, two categories table and four intermediary tables works fine but I know its not efficient. I have tried to figure out how to use Laravel's Eloquent relation

hauwa's avatar
hauwa's avatar dylanglock...9yrs agoLaravel
1
1
Last reply by dylanglockler 9yrs ago
winterhevn's avatar

Lumen and several Laravel instances in different servers

Hi, I'm currently studying Lumen and I am creating a web application. It's an e-commerce web app and I want the Admin dashboard, merchant dashboard and the actual shopping site in different laravel instances and different servers. I'm planning to place Lumen and the database in 4th server. Is having too many servers bad? What setup is better?

winterhevn's avatar
winterhevn's avatar winterhevn9yrs agoLumen
5
1
Last reply by winterhevn 9yrs ago
beerbuddha's avatar

Anyone know how to expand the spark app

The Spark app in terms of billing / scaffolding seems to be geared towards those who wish to offer subscription based application portals. However we all know that Laravel app itself do many things (api, cms, ecommerce, etc), has anyone been able to (or know someone) who utilize Laravel Spark for something else than a subscription based invoicing system?

beerbuddha's avatar
beerbuddha's avatar ejdelmonic...9yrs agoSpark
1
1
Last reply by ejdelmonico 9yrs ago
242Studios's avatar

Seeding Problem - Array to string conversion

Hi, I'm pretty new to Laravel and I just got in on the Laracasts Black Friday promotion and I'm so excited. I'm hoping somebody can help me with this. When I try to seed my database with a model factory, I'm getting the following error: [Illuminate\Database\QueryException]

242Studios's avatar
242Studios's avatar Mwangaben7yrs agoLaravel
4
1
Last reply by Mwangaben 7yrs ago
kayintveen's avatar

Filtering trough big arrays, collections vs looping through mysql performance choice

Hi all, I'm creating a filter tool to filter e-commerce products down.. Meaning the user can choose multiple filters and manipulate, include or exclude data. So for now i have a rules table, and of course a products table. The rules can have maybe 10, maybe 50 rules (if price < 10 exclude) (if price > 100 change attribute shipping to 0) Those kinds of filters. But when it

kayintveen's avatar
kayintveen's avatar moka9yrs agoLaravel
3
1
Last reply by moka 9yrs ago
jericopulvera's avatar

Multiple laravel project in DigitalOcean Host. No laravel forge.

I wanted to create a website which will have this routes. www.mywebsite.com -> This will be a one page portfolio that has the projects list I created. www.mywebiste.com/e-commerce/public/ -> this will contain my e-commerce sample project www.mywebsite.com/social-network/public/ -> this will contain my social network project www.mywebsite.com/blog-website/public/ -&g

jericopulvera's avatar
jericopulvera's avatar fideloper9yrs agoServers
3
1
Last reply by fideloper 9yrs ago
kinshara's avatar

Mail Later takes too much time.

Hi guys, I am developing e-commerce website which it send an email after registration. that feature took so much time for user to move on to next step. I tried to figure it out. and I got it. it is Mail function Mail::later(5, $view,$email_data, function($message) use($to,$subject){ $message->to($to)->subject($subject); }); whenever I put this code to

kinshara's avatar
kinshara's avatar kinshara9yrs agoLaravel
3
1
Last reply by kinshara 9yrs ago
kayintveen's avatar

Storing variable product attributes as json in mysql or eav table?

Hi all, I'm making a product management application for e-commerce solutions. its really something i struggle with for clients maintaining their product data and distributing it to multiple channels but all channels accept different formats, Excel, Csv, Xml and so on. Some via feed and some via update. Anyhow i have been playing around with database structures of products tryin

kayintveen's avatar
kayintveen's avatar kayintveen9yrs agoLaravel
0
3
MrRobot21's avatar

Laravel API for Apps and Web and Vue.js

Hi Awesome People I'm a kinda confused about API please point me in the right direction We want to develop an e-commerce website and Mobile apps as well with one database, my doubt is how to create a n API so that both app and the web interact with database or is there a better way to do that. What is the best architecture to achieve this Thank you

MrRobot21's avatar
MrRobot21's avatar MrRobot219yrs agoLaravel
12
1
Last reply by MrRobot21 9yrs ago
niczak's avatar

X-Cart / Aimeos or Similar? (E-Com)

Hey all - I have the opportunity to build something from the ground up and naturally I want to use the latest version of Laravel. This is purely for an e-commerce site which will be selling roughly 200 products to start and will require a lot of filtering options on the data. That said, has anybody use X-Cart with Laravel and had a good experience? Aimeos is obviously built

niczak's avatar
niczak's avatar niczak9yrs agoLaravel
1
1
Last reply by niczak 9yrs ago
lewiscainscube's avatar

Access transactions/order history using the paypal api

Hi folks, I have a new project to begin which will involve using PAYPAL. My client currently uses ebay with paypal for the ecommerce side of their business. In this case, they do NOT require for there to be an option to send payments through their website as it is not an ecommerce website. They are happy that ebay manages their needs for managing the payments. All I need is the

lewiscainscube's avatar
lewiscainscube's avatar lewiscains...9yrs agoGeneral
0
1
brainlabs2010's avatar

Handle Payment gateways

Hi, This is a general question. I'm currently working on e-commerce website. I've integrated Payumoney (INDIA). The thing is i've one problem if someone made a payment while during the redirect process to our website suddenly some power breakage will occur or Internet goes down. From client side the payment is done but as we didn't any response from the payment gateway we can't

brainlabs2010's avatar
brainlabs2010's avatar MikeHopley9yrs agoGeneral
3
1
Last reply by MikeHopley 9yrs ago
madsynn's avatar

Help understanding validation

Can someone please help me with my understanding of validation. I have tried to find the answer for this question but have not been able to as of yet and I am hoping all of you might have my answer. Lets say i have two models with two tables. Product::model Price::model products::table prices::table I have fields from both that are used in my crud for products in m

madsynn's avatar
madsynn's avatar Snapey9yrs agoLaravel
4
1
Last reply by Snapey 9yrs ago
madsynn's avatar

Relationship not returning fields

Hello everyone, Hope you can help me. Windows 10 / Homestead Laravel 5.1 I have a ecommerce project i am building and here is my problem. I have the following tables: products Schema::create('products', function (Blueprint $table) { $table->increments('id'); $table->string('status')->nullable(); $table->string('availab

madsynn's avatar
madsynn's avatar madsynn9yrs agoLaravel
34
1
Last reply by madsynn 9yrs ago
codersrini's avatar

Route::controller() in Laravel 5.3

We have completed an end-to-end E-Commerce platform using laravel 5.2.x. The project was started in January 2016 and we are in the final stages. Have used Route::controller() method on almost 100+ routes. Changing all these into explicit rules at this stage is really painful task. At the same time we would like to upgrade laravel to 5.3 and use its benefits such as broadcasting

codersrini's avatar
codersrini's avatar sradmin@sa...9yrs agoLaravel
11
1
Last reply by [email protected] 9yrs 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.