Laravel

Laravel 5.7 HTTP URL Redirects

Today in this article we will discuss the HTTP URL Redirection in Laravel 5.7.  Laravel HTTP Redirect is an instance of Illuminate\Http\RedirectResponse class, which contains all necessary headers that needed to redirect the user to specific URL. Laravel provides many ways to generate RedirectResponse instance. redirect helper is the simplest way to redirect user to another URL. redirect helper is a global helper method. Redirect To URL in Laravel This is the simplest way to redirect the user to a particular URL.

Note: In the above example, If user hits the /dashboard URL then we are redirecting that user to new URL and that is /home/dashboard. Redirect Back To The Previous Page in Laravel Laravel is a very powerful PHP framework …

Read More
Laravel

Email Verification – New Feature of Laravel 5.7

Today, Laravel is a very powerful framework of PHP. Because of it’s vast available & scalable libraries/packages & developer’s full control on the project, It is now a new trend in PHP Web Development. On September 4th, 2018 Laravel has released it’s new edition i.e. Laravel 5.7 with some new features. Which make development more easy, fast and flexible. Laravel 5.7 Changes Log Laravel 5.7 continues the improvements made in Laravel 5.6 by introducing Laravel Nova. Optional email verification to the authentication scaffolding. Support for guest users in authorization gates and policies. Console testing improvements. Symfony dump-server integration. localizable notifications. Variety of ther bug fixes and usability improvements. Today, In this article we will discuss one of the new features of …

Read More
How To Fix Laravel SQLSTATE[42000]: Syntax Error Or Access Violation 1071 Specified key was too long

How To Fix Laravel SQLSTATE[42000]: Syntax Error Or Access Violation 1071 Specified key was too long

Today we will discuss the most common error of Laravel 5.4+ that is “Syntax Error Or Access Violation 1071 Specified key was too long”. Before moving ahead we should know the main root cause of this error. Laravel 5.4+ has made changes to the database’s default character set. Now, the updated character set is utf8mb4, which supports the emojis. Now, with this character set, you can store emojis in database table easily. If your web application/website is running on MySQL v7 or above then you do not need to do anything. Otherwise, you may face the following error while running the database migration command. Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes …

Read More