Skip to content

Tag: laravel-5.5

Laravel 5.5 BelongsToMany with pivot conditions

I have three models, Clinic, Department and ClinicDepartment and has belongsToMany relation called departments from Clinic to Department using ClinicDepartment’s table as pivot table, but when i using this relation, scopes from ClinicDepartment not aplying in query. I decided to make Pivot model calling…

Laravel dump() unexpected output

Using Laravel 5.5.34, I have trouble outputting debug information in Blade templates using the dump() helper. results in the following output: I wouldn’t expect the raw string “test” to show up below the actual debug output. Is this the normal behavior and if yes, how can I disable it? If no…

Why is broadcasting/auth not found?

Already uncommented at config/app.php: and Error: I am using Mamp 4 and Laravel 5.5. Answer Try this commands php artisan config:cache composer require pusher/pusher-php-server “~2.6” (user 2.6 because 3.0 has class Pusher not found issue) composer update (just to make sure everything is up to dat…

Laravel 5: php artisan migrate:refresh

I am working on a laravel project and each time I change my table (add or remove column) and run php artisan migrate:refresh. I get this error: [SymfonyComponentDebugExceptionFatalErrorException] Can’t use method return value in write context Solution tried: run composer dump-autoload (Fails) Drop table…