Category : laravel-8

i started learning laravel 8 and i downloaded a file from a course in udemy but this file can’t run and give me this error PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of IlluminateSupportCollection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily ..

Read more

I want to send an email to Mailtrap.io when a user registers a new account. I have added this credentials to .env: MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=my_username MAIL_PASSWORD=my_password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=null MAIL_FROM_NAME="${APP_NAME}" But this would return this error: Cannot send message without a sender address And if I change the MAIL_PORT to 25, I get this error: ..

Read more

I have created a basic CMS (Content Management System) using Laravel 8. I am not using Blade. All of my views are plain PHP and HTML. At this point everything is working but I have a lot of redundant code. Is there anyway to incorporate component like logic without using Blade? Should I just use ..

Read more

I’m learning Laravel’s relations. I’m having problems with the 2nd line. I would like to display records that Auth::user table’s br_name column = Partner table’s br_name column matches. Could you teach me the right code please? $blogs = Blog::with(‘user’, ‘category’, ‘partner’) ->where(‘AppPartner::partner()->br’, Auth::user()->br_name) //I’m having trouble this line ->where(function ($query) { $query->where(‘status’, ‘=’,’new’) ->orWhere(‘status’, ‘=’, ..

Read more