What does the make() method do in Laravel?

Laravel’s make method is used to create an instance of a class or interface.While creating an instance with make method Laravel will automatically inject all dependencies of class that is defined in it’s constructor. E.g. an instance of the Mailer class would be automatically injected in below code. namespace AppServices;use IlluminateMailMailer;class MyService{ public function __construct(Mailer […]

Read More

Fixing syntax error or access violation 1071 specified key was too long max key length is 767 bytes

Fixing syntax error or access violation 1071 specified key was too long max key length is 767 bytes [IlluminateDatabaseQueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email)) [PDOException]SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too […]

Read More

How to resolve phpunit/phpunit 5.7.8 requires ext-dom * error while installing Laravel 5.4

Installing php-xml extension on ubuntu based on php version If you are facing “phpunit/phpunit 5.7.8 requires ext-dom *” error at time of installing Laravel then you need to install or upgrade your php xml extension. You can installing php-xml by running below commands on terminal. Make sure you are installing right version of php-xml extension. […]

Read More