Laravel Call to undefined method App\Exceptions\Handler::unauthenticated()

If you are facing problem in Laravel Call to undefined method App\Exceptions\Handler::unauthenticated(), this post might be helpful for you. It happens because unauthenticated function somehow missing from error handler.

Go to App\Exceptions\Handler.php file and add the following function.


Make sure top of your class, you have used use

Illuminate\Auth\AuthenticationException as AuthenticationException;



How to upload laravel in cPanel

Often you might be able to face this problem. Today, I am showing you how to upload laravel in cPanel. Of course, there are few ways to upload laravel project in cpanel. However, this post shows you by modifying .htaccess file.

Upload your entire files and folder to your cPanel. After successfully uploading, if you want to access that url (i.e. you might able to see a list of directory and files. Isn’t that?

If so, create a .htaccess file into your main directory and write following line of code.

Now, save your file and run. Hope it will work.


Mastering on Github

If you use Git each and every single day, this post might be helpful for you. I write this post for my personal preference as well.

Push commit to another Branch

If you are on a development team where there is more than 1 developer, you might need your personal branch to update your work. In this case, you need to know how to push the commit to another branch.

You need to specify the source ref and the target ref:

git push origin branch1:branch2


git push <remote> <branch with new changes>:<branch you are pushing to>

How to set Crontab job in Macbook

I will show you the simplest way that how to set crontab job in Macbook. Let’s see here.

How to use?

Go to terminal, and write following line, then hit enter.

env EDITOR=nano crontab -e

Now you are able to write your cron instructions. Just add whatever you want. I am showing you one example-

* * * * *  cd ~/my/backup/folder && ./

How to use URL?

Well, if you need to use url in cron job, here are the ways-

Way 1:

Use curl to fetch the data.

* * * * * curl http://localhost/your/url
Way 2:

You can use wget for that.

* * * * * wget http://localhost/your/url

Now save your crontab.

How to see the list of the Cron job?

Just write following line of code in terminal and hit enter.

crontab -l

Laravel Carbon Display Local Dates and Time

If you use laravel and want to make it localized your date time, I think Laravel Carbon Display Local Dates and Time will help you to achieve.

Now based on your requirement, you can assign any place name that you want.




Laravel Prevent Disposable Emails

If you are looking for Laravel Prevent Disposable Emails, I think this post can be helpful. I discovered one of the packages for that called EmailChecker.

How to Install

Install Via Composer:

composer require mattketmo/email-checker


How to Use

Use as providers and aliases inconfig/app.php –




'EmailChecker' => EmailChecker\Laravel\EmailCheckerFacade::class


Access Via Facade:

Access Via Container:

Make sure you have used top of your controller.

use EmailChecker


By default, this package already added more than 2k domains. If you need to add more domain to that list, just search the file name throwaway_domains.txt and add the domain that you want to prevent.