Category "laravel"

How to delete old images from public folder on update using Laravel

I want to delete older images in public folder on update: My Controller code: try { $path = public_path('profile_images'); @mkdir($path, '0777', true);

The Mix manifest does not exist - Laravel Fortify Jetstream Login/Registration Issue when deploying laravel in Hostgator shared hosting

I have been able to deploy Laravel projects successfuly in the past. For the first time I am using Laravel 8 with Jetstream and Livewire. Laravel is now using F

Laravel. Json column with cast as array are returning as a string when using JOIN in query

Laravel 8. I have two tables(models) 'employees' and 'positions'. In a model 'employees' I have a casts: protected $casts = [ 'academic_post' => 'array'

Problem with fetching data from database in Laravel

I have a search form to list properties/ads through certain criteria. I am trying to fetch all properties based on offer or demand, depending on what is clicked

How can I pass the list to the component variable in Laravel?

How can I pass the list to the component variable? I tried to add elements of a list in @php tags like this , for now,, in the future, I will fetch this list fr

yield inside section in Laravel 8

I am trying to yield a section inside another section which is itself yielded in master.blade.php, but it does not work. master.blade.php <!DOCTYPE html>

Unable to extract Unique Identity for Emails sent from Safaricom Internal Mails ie Message ID (PHP IMAP)

I am having a challenge,I am unable to extract a unique field from emails sent directly from Safaricom Internal Mails to our Customer Service Mailbox. All other

when i run the code "php artisan migrate --seed" that's not work completely

when i run this code "php artisan migrate --seed" qppeaer one error like SQLSTATE[42S02]: Base table or view not found: 1146 Table 'naryn.modules' doesn't exist

Morph field doesn't have a default value when seeding factory relationship

I have a Recipe and Review model: class Recipe extends Model { use HasFactory; protected $guarded = ['id']; public function reviews(): MorphToMany

How to merge components in VueJS

The Laravel framework and the laravel.mix compiler are used. There is one main component "dialog". <template> <transition-group enter-activ

To call class only once in laravel

I have laravel application and I have used singleton pattern public function boot/register() { $this->app->singleton( 'className',

Star and Half Star Rating in Laravel

I want to display average product ratings in star. The values are displaying good but I want to show half star if the value is in float. My blade view: <div

Why Notification is queued in redis without implements ShouldQueue?

In laravel 9 app I use queues with redis and for that in notifications which must be queued I wrote : class CurrencyRatesImportRunNotification extends Notificat

Laravel Blade component method not rendering in cpanel-server but work in my localhost

I have a component RemoveBook in app/View/Components/RemoveBook and the blade component in resources/views/components/sections/parts/remove-book.blade.php. all

Laravel 8 factory state afterCreating

Laravel 7 factories had method afterCreatingState() where you could define what should happen after Model with specific state was saved into database. $factory-

Laravel Model save() & update() Not Saving

Laravel 5.7 Hello I have been looking through stack overflow and have tried many possible answers and have come to no conclusions. I am updating a simple inte

Localhost is currently unable to handle this request. HTTP ERROR 500 with laravel app in Win 10

I have imported Laravel app inside my PC (Win 10) and put it in htdocs folder then I have changed the default directory which will serve me when type "localhost

Passing a boolean value from checkbox in Laravel form

I am trying to save boolean value when I create a new Post and then have it update the value if I update the Post. When I create a new Post and save, it persist

laravel and phpunit: could not find driver (SQL: PRAGMA foreign_keys = ON;)

I have run my laravel app with phpunit. Everything is fine until at some point when I run my test again turns out with this error. Illuminate\Database\QueryExce

Laravel Multi-language routes without prefix

Currently, my system is using 2 languages which is English and German. my goal is to browse following routes by switching between the mentioned language - bas