Thomasvdw

Thomasvdw

Member Since 2 Months Ago

Experience Points
640
Total
Experience

4,360 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
4
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
640 XP
Jul
28
1 month ago
Activity icon

Replied to Unable To Resolve NULL Driver For [Illuminate\Mail\TransportManager]

InvalidArgumentException
Unable to resolve NULL driver for [Illuminate\Mail\TransportManager].

Application frames (1) All frames (77)
76
InvalidArgumentException 
…/vendor/laravel/framework/src/Illuminate/Support/Manager.php81
75
Illuminate\Support\Manager driver
…/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php94
74
Illuminate\Mail\MailServiceProvider Illuminate\Mail\{closure}
…/vendor/laravel/framework/src/Illuminate/Container/Container.php799
73
Illuminate\Container\Container build
…/vendor/laravel/framework/src/Illuminate/Container/Container.php681

And on with 72 other frames within Illuminate.

As for where error occurs:

laravel/vendor/laravel/framework/src/Illuminate/Support/Manager.php
     * Get the default driver name.
     *
     * @return string
     */
    abstract public function getDefaultDriver();
 
    /**
     * Get a driver instance.
     *
     * @param  string  $driver
     * @return mixed
     *
     * @throws \InvalidArgumentException
     */
    public function driver($driver = null)
    {
        $driver = $driver ?: $this->getDefaultDriver();
 
        if (is_null($driver)) {
            throw new InvalidArgumentException(sprintf(
                'Unable to resolve NULL driver for [%s].', static::class
            ));
        }
 
        // If the given driver has not been created before, we will create the instances
        // here and cache it so we can return it next time very quickly. If there is
Activity icon

Replied to Unable To Resolve NULL Driver For [Illuminate\Mail\TransportManager]

Thanks for the suggestion, but no I am using the default Mail that comes with Laravel...

Jul
26
1 month ago
Activity icon

Replied to Unable To Resolve NULL Driver For [Illuminate\Mail\TransportManager]

@bobbybouwmann Laravel Framework 6.10.1

Now it does seem weird that my config/mail.php contained MAIL_MAILER which would be specific for Laravel 7, right?

When I look at the error I receive, it occurs here:

return new Swift_Mailer($app['swift.transport']->driver());

Now I see in the upgrade to 7.x instructions (https://laravel.com/docs/7.x/upgrade) that "Laravel 7.x doesn't provide swift.mailer and swift.transport container bindings.". I suppose that for laravel 7.x the following would then indeed fail and result in "null": $app['swift.transport']

The question is; why is that also the case for me, as I am on Laravel 6.10.1?

Activity icon

Replied to Unable To Resolve NULL Driver For [Illuminate\Mail\TransportManager]

@bobbybouwmann These were indeed different, should have spotted that. Thanks.

Now after changing .env file to MAIL_MAILER, and running

php artisan config:cache
php artisan config:clear
php artisan cache:clear

Still the issue persists... Any possiblity this is cached somewhere else?

Activity icon

Started a new Conversation Unable To Resolve NULL Driver For [Illuminate\Mail\TransportManager]

Hi all,

I am stuck on "Unable to resolve NULL driver for [Illuminate\Mail\TransportManager]" in attempting to send e-mail verification e-mail on user registration using gmail.

in routes/web.php I have:

Auth::routes(['verify' => true]);

and app/user.php contains:

use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements MustVerifyEmail

in .env:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=465
MAIL_USERNAME=[username]@gmail.com
MAIL_PASSWORD=[password]
MAIL_ENCRYPTION=ssl

To make sure the .env is used by config/mail.php, I ran:

php artisan config:cache
php artisan config:clear
php artisan cache:clear

Subsequently, I see in tinker that env('MAIL_PASSWORD') returns the valid response (not-null).

Nonetheless, I keep getting this NULL driver error; what can I do?

Activity icon

Replied to Include(.../Controller.php): Failed To Open Stream: Permission Denied

Hi @bobbybouwmann ;

It seems indeed related. I found this resource (https://stackoverflow.com/questions/37257975/permissions-issue-with-laravel-on-centos) which claims it may be related to selinux.

When I perform:

setenforce 0

the controller can be accessed, and site loads as expected. As it is not proper in terms of security, I turn it back on:

setenforce 1

now the same errors is back:

failed to open stream: Permission denied

I then managed to fix it by performing the following commands, using semanage fcontext to manage the default file system labeling on an SELinux system as suggested in the link above by the second answer:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/.../laravel/storage(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/.../laravel/bootstrap/cache(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/.../laravel/config(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/.../laravel/app(/.*)?"
restorecon -Rv /var/www/.../laravel/

Now I am not an expert in SELinux in any way, but I can only assume that this probably has an effect on the security. Noted, but I can at least proceed for now...

Thanks for the suggestions!

Activity icon

Replied to Include(.../Controller.php): Failed To Open Stream: Permission Denied

@bobbybouwmann Successfully executed chmod -R 755 /var/www/... It does not change the error though. It's weird that I can still successfully see the default page, but not any other. As soon as I try any other page which has to go through a controller, it presents this error.

Jul
25
2 months ago
Activity icon

Replied to Include(.../Controller.php): Failed To Open Stream: Permission Denied

@bobbybouwmann

Checked the directories of storage and cache did not exist. Manually created the directory, changed ownership to apache.apache and changed rights to 755.

Still though does not work... Same error:

include(/var/www/.../laravel/app/Http/Controllers/HomeController.php): failed to open stream: Permission denied

as for the directory; yes it is correct. (replace ... with the actual url of the website)

Activity icon

Started a new Conversation Include(.../Controller.php): Failed To Open Stream: Permission Denied

Hi all,

Using: Apache, CentOS 7, Laravel 6.x (to be updated next)

Problem: After successful installation of laravel (default page showing), I have moved my local development files over. Now before replacing the default routes/web.php I wanted to check if things were OK. I added one of the routes, using a just uploaded controller and view.

When I try to access this page (..../profile) it shows following error:

include(.../Controller.php): failed to open stream: Permission denied

Whereas the default page (.../) still works as normal.

What I have done to attempt to fix:

  • sudo chown -R apache.apache /var/www/.../laravel
  • sudo chmod -R 755 /var/www/.../laravel/storage
  • sudo chmod -R 755 /var/www/.../laravel/bootstrap/cache
  • sudo php artisan view:cache

All files (including the default view) are owned by apache.apace, so ownership is the same. As per directory permissions I have set the storage and bootstrap/cache folders (https://laravel.com/docs/6.x). How can this be fixed? I am out of idea to fix this...

Jul
22
2 months ago
Activity icon

Replied to Composer Install Fails On App\Exceptions\Handler Does Not Exist

Fixed after doing following changes: - https://stackoverflow.com/questions/50840960/script-php-artisan-packagediscover-handling-the-post-autoload-dump-event-retur - but then the other way around; seems like I got laravel 7.x files whilst my composer.json specifies 6.10.x.

Afterwards php composer clearcache, and php composer install ran without errors.

Activity icon

Started a new Conversation Composer Install Fails On App\Exceptions\Handler Does Not Exist

On CentosOS with following:

  • php 7.2.31
  • "laravel/framework": "6.10.*"

Locally created composer.lock file and used that to perform composer install on CentosOS, but is stick with following error:

PHP Fatal error: Declaration of App\Exceptions\Handler::report(Throwable $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Exception $e) in /var/www/bikegeartracker.com/laravel/app/Exceptions/Handler.php on line 8 PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /var/www/bikegeartracker.com/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:803

Tried:

  • rebuilding composer.lock file; same result
  • removing laravel directory in vendor, clearing cache; same result
  • removing laravel in full; same result.

Any suggestions?