jeudi 24 septembre 2020

how to handle sort by with products laravel

I am trying to sort my product through click on this buttons, but above check is not working enter image description here



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2RX9ZHY
via IFTTT

Configure Laravel and VueJs on a domain

I have the following 2 projects

  • Project1) /var/www/html/laravel58/public
  • Project2) /var/www/html/vue2/dist

Project1 (Laravel) is currently configured on my domain http//www.domain.com

How to configure VueJs Project2 (VueJs) as http//https://ift.tt/2GabNKL

The current apache config is as under

<VirtualHost *:80>
    ServerName domain.com
    ServerAdmin admin@domain.com
    DocumentRoot /var/www/html/laravel58/public

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html/laravel58/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2RT2W2H
via IFTTT

lynx39/lara-pdf-merger not working on live ubuntu server

I am using this package https://packagist.org/packages/lynx39/lara-pdf-merger for merging pdfs. This package is working fine on localhost but not working on live server .

Giving this error

Exception
Symfony\Component\Debug\Exception\FatalThrowableError: Class 'TCPDI' not found in /var/www/html/coldxlogistics/vendor/daltcore/lara-pdf-merger/src/LynX39/LaraPdfMerger/PdfManage.php:19

What could be the reason?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/304DBr6
via IFTTT

Get the details but ignore user if exist another higher level

I have a table looks like

id  user_id  level

1     1        1
2     1        2
3     2        1
4     3        1

Here user id 1 exist in level 1 and level 2 Now when we count group by level then in counting we want ignore user_id 1 from level 1 cause it exist another group. we want to consider only one group existing and higher group.

I have done only group count but cant understand how ignore counting.

My current query is

UserCertificate::with('user')->where('level','1')->distinct('level')->orderBy('id','ASC')->get();

My Query return counting

id  user_id  level

1     1        1
3     2        1
4     3        1

But I want looks like

id  user_id  level

3     2        1
4     3        1

User Id 1 will be ignored cause it exist in level 2



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32Vgrp8
via IFTTT

mercredi 23 septembre 2020

Destroy session on closing tab or window in laravel

I want to destroy session when tab/window close in laravel . I also changed

'expire_on_close' => true, //config/session.php

but still not working. I also executed necessary commands. like config:cache, config:clear , composer dump-autoload . Not working . Thanks in advance



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32YLH6B
via IFTTT

Laravel blade Variable issues -> undefined index

I am facing some issues when passing a variable to my view with an image path.

When I trying to use this to get the image path

@foreach ($data as $dat)
<img class="img-responsive" src="" alt="">
@endforeach

I get this error

Undefined index: wp:featuredmedia (View: /Users/sam/Documents/development/shop/resources/views/landing-page.blade.php)

When I use only I get the correct path to the image without an error.

How can I fix this ?

Thanks



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/33WSCMX
via IFTTT

Laravel/homestead - No input file specified

I'm new to Laravel, trying to set up very first website, but getting "No input file specified" when trying to open my website "belekas.test" I believe that my yaml and hosts files are correct, but will include pictures of it.

Things I have tried:

vagrant halt

vagrant up

vagrant ssh

vagrant reload --provision

serve homestead.app public

sudo service nginx restart

yaml:

ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox


folders:
    - map: ~/Laravel
      to: /home/vagrant/Laravel

sites:
    - map: belekas.test
      to: /home/vagrant/Laravel/belekas/public

databases:
    - homestead

hosts: 192.168.10.10 belekas.test

that's how my terminal looks like:

enter image description here

Update: After running vagrant up --provision and vagrant reload --provision few times, my page load into another Class 'Illuminate\Session\Store' not found error

enter image description here



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3cqi9SD
via IFTTT