#7 LaraShop | Product Listing | e-commerce website in laravel 5.5 tutorial
Articles,  Blog

#7 LaraShop | Product Listing | e-commerce website in laravel 5.5 tutorial


okay friends let’s continue products
management in this video we will cover product listing as you can see inside
the admin panel I already add some dummy products total
ten okay now we will display in our front-end if user type products and we
will display all products a then later we will filter by category everything
but now we will create product blade and trout so go to your editor resources
view front inside the front you will create a new file products dot blipped
dot PHP now inside your folder you will find theme this is st ml theme in this
theme you will see listening dot PHP just copy all data and paste in your new
products blade please save it close your listing dot PHP okay inside this code
you can see include header and include foot actually you don’t need this type
of include you just extend your view of mustard or blade for that you will put
here extend function by blade laravel expense and put year masters with folder
name front mustard okay and this is your selected
content you can change it according to your for now I will now put here section
called content and when your it was closed
you will help and – action okay remove this footer dot PHP let’s save it
now you need to set your route web dot PHP here you will put new route for
products route you I say if user click on products then it will show run dot
products products ok refresh the page now you can see is your new page with
listing dot PHP data but image is not display because we have to set that go
to your editor product blade base search your email source here is your product
images ok to set this just copy this fill slash
and paste here we will replace with actual path actual process config H
Aptos us it will fetch your actual slightly you error automatically and
before image you will say please / image guess
we please call and save it go to your browser refresh product blade page okay
you have a error okay I think get ok I’m a cut I have to set this URL you can see
you are ok replace it if I must take say with reload and you can see when much
mistake here is – ok don’t save it yes ok now you can see your product images
come now we need to display this actual product information place of this domain
4 meses ok first over we will display images product name and something like
this price ok so go to the editor here you can see columns 6 and 4 just X this
minimize div and use PHP comment you command this all products you can left
only one ok here you will put your loop okay for that you have to go to web tour
PHP and put here I mean pass a data or you can name it anything ok I name it
data and pass that array array of products
for now it will be all all that okay now here you will say for each it’s data
contain your array and close your save it X and your column try to change the
name and image okay here we will say row name it is your my sickle column name
you make the soft red okay and here you will change the product email sauce do
you don’t need him because you have a email saved in public image here is your
products okay so make it public image change the name name by dynamically here
Eric so image save it refresh now you can see issuer
dynamically product is coming whole product one two three four five six
seven eight nine ten all product is there okay now we will
display price and if we can display description also let me check here you
will say rice MN product price and let me check what we can make here is
product code so you can display here for that coach variable P if it go to your front end we
load here you product code product price okay let me change it a div one more
column you can do turn middle to add column and you can use PHP my admin to
add a column go here products structure adhere column anywhere you can put here
name it info or Japan shape throw in polls text anything you can add it okay
here you will display a text area to update this information okay go to your
resources you admin and here is a debugger copy this course even we name it
anything just in the view and here is okay ID that’s rich go to your
JavaScript code here variable so useful see your ID dot why
do and yes you can put or you can copy this also throw in pole plus I’m not here wait a minute as the turtle feels
here you can put here with and sign in for your variable name product save it
okay now check us out it and here is put that name for but change it text area text area okay it’s tax area not contain
any values it will display between tags okay say reload now you can put here
some and product is updater let me check dummy product dummy one to four okay
it’s not it will not update I think we mistake here inspect console save it
Network you can see what is pass and what is not plus is product okay
maintain is controller need to update according to
your column AB HTTP controller go to your product material and not here so it
is here say product and a duplicate here you will say that’s okay I’ll let me
change it and some value 4.8 PO click on semester and you submit let me check on
my cycle Adam II know it’s not done say product you can see it’s going response
also done where is ok is insert ok you put two pair of product info and this is
empty so you have to put request because you
can see here is put that info this one you have to put here
it’s coming here store here and passing here save it now this is final
if you enter the value if they start again click on submit button it will
saved you can see is product info now time to display here ok this by default
image changed so let me change the any image for now upload ok here is a update
ok we don’t need here actually we don’t need here image update ok while you
gonna update something reload ok now try to change the price and info submit ok
reload about here actually here is reload and you can see product image not
change ok now reload your content and you need
to display your information here go to your product lead here you will put be a
span plus be done extra small and here you will put variable P in the Lord now you can see we have a data
or your product info okay others I have not nothing so I will put here mainly
okay you can do it professionally it’s a show link of basics let me complete this anywhere views you can put it now reload
your Fantan product listing you will see someone okay I think you don’t need to
put here span again only BR it’s okay save it
reload now this is okay that’s nice okay guys in this next video we will get
rise by products shop category and product category I keep this will not
categories this will some filter price filter sort we will cover it in upcoming
videos okay thank you

4 Comments

  • inteliconn

    Hello, alter command, composer install, error:

    [IlluminateDatabaseQueryException]
    SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using pa
    ssword: NO) (SQL: select * from `products`)

  • inteliconn

    After command: php artisan migrate error:
    [IlluminateDatabaseQueryException]
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydatabase.products
    ' doesn't exist (SQL: select * from `products`)

Leave a Reply

Your email address will not be published. Required fields are marked *