mercredi 23 septembre 2020

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



via Chebli Mohamed

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



via Chebli Mohamed

Summernote and Laravel add select on wysiwyg

wysiwyg editor

Is it possible to add select function in the wysiwyg editor? Instead of typing <select></select>in the code view.



via Chebli Mohamed

Add point datatype field in laravel 5.8 migration

I have to add point datatype for a postgres database field in laravel 5.8. I am using below code -

$table->point('point_table')

It is adding geography datatype.

The same question has been put here as well.

How can I add point datatype.



via Chebli Mohamed

Laravel DOMPDF failed to open stream: No such file or directory

I am using barryvdh/laravel-dompdf and trying to save a pdf file . it gives me a error

 file_put_contents(core/storage/app/pdf/pdffile50.pdf): failed to open stream: No such file or directory

File is not created

    $pdf = PDF::loadView('invoice::pdf_generate', $data)->setOptions(['dpi' => 115, 'defaultMediaType' 
    => 'media', 'defaultFont' => 'sans-serif', 'isRemoteEnabled' => true])
     ->save('core/storage/app/pdf/pdffile'.$invoice->id.'.pdf');

Does any one why am I getting this error?



via Chebli Mohamed

Timezone is not changing in laravel

I want to change timezone but it is not working

I have changed timezone in config/app.php

My previous timezone was 

'timezone' => 'Asia/Kolkata',

and i changed it to 

'timezone' => 'UTC',

But it is not working, please help me.



via Chebli Mohamed

mardi 22 septembre 2020

How release versions of laravel product?

We have laravel product. Now it has become a huge product. Till now we were uploading our daily updates on the live server. But now we are going to release Beta Version and from now we want to upload on the server with proper process. I mean we should have a record of the version of the product and another documentation process.

Is there anything which laravel can provide us for this purpose?



via Chebli Mohamed