skip to Main Content

Laravel Basic BelongsToMany

I have ProductCollection Model and AttributeValue Model which have a common table product_collection_attributes that has 2 columns: product_collection_id and attribute_value_id that are a foreign key to their respective tables and are both a primary key. In ProductCollection Model relation is:…

VIEW QUESTION

Php versions – Laravel 11 failing with composer install on ubuntu apache2

with composer create-project laravel/laravel project-name failing with an error. Generating optimized autoload files > IlluminateFoundationComposerScripts::postAutoloadDump > @php artisan package:discover --ansi PHP Warning: require(/Documents/project-name/vendor/autoload.php): Failed to open stream: No such file or directory in /Documents/project-name/artisan on line 9 PHP Fatal error:…

VIEW QUESTION

Laravel 11 – Auto discovery of event listeners inside a custom directory

Before Laravel 11, I used to bind listeners to events inside the AppProvidersEventServiceProvider provider class, for example: <?php namespace AppProviders; use AppEventsMyEvent; use AppListenersMyListener; use IlluminateFoundationSupportProvidersEventServiceProvider as ServiceProvider; use IlluminateHttpClientEventsResponseReceived; class EventServiceProvider extends ServiceProvider { /** * The event to…

VIEW QUESTION
Back To Top
Search