Multi guard authentication in laravel
Decode Web
by Dinesh Suthar
4y ago
Here is another interesting topic of guard in laravel we are going to cover in this post. As we all know user authentication can be achieved in jiffy, that is, run php artisan make:auth and you will get controllers, blade views all ready to launch with authentication. But..but.. Here is the catch. Laravel provides default authentication on User model or users table, what if there are two types of users completely different to each other, for example application users and admins ? One thing we can do is, make a column in users table with name as type and there we define type of user, 1 ..read more
Visit website
Importance of composer.lock in git
Decode Web
by Dinesh Suthar
4y ago
Since Composer is a dependency manager in PHP and its frameworks like Laravel, we know every dependency is managed in the composer.json file of the project, but do you know there is one more important file which handles the dependency more finely. It is a composer.lock file. What is composer.lock ? The file composer.lock maintains dependency in more depth i.e it points to the actual commit of the version of the package we include in our software. Let’s take an example and understand. composer.json { "require":{             "laravel/framework": "5.8.*",           } }Here ..read more
Visit website
Sending mail with attachment using laravel and mailtrap.io
Decode Web
by Dinesh Suthar
4y ago
Laravel provides a very simple api to send mail to users. Today in this topic I am going to show you how to send mail with attachment using mailtrap.io. MailTrap is a tool through which we can test our outgoing mail,their look and feel on various devices. All we will be learning today. Make laravel mailer class In laravel we can create a mailer class through artisan command. php artisan make:mail SendMailWithAttachmentAs a result, it will generate a filename SendMailWithAttachment.php in App\Mail directory. Just copy paste below contents in the generated file. <?php ..read more
Visit website
Simplified way of processing large data using chunk() in laravel
Decode Web
by Dinesh Suthar
4y ago
What do we mean by large data ? As a laravel developer, by large data I mean collection of 1000 or more rows from a single data model that is, a database table; specifically on a MySQL / MariaDB server.  Problems with processing large data ? There may be situations when a single table holds millions of records and you want to migrate those records to another table after processing. As far as MySQL is concerned here in this context, PHP has some limitations in terms of memory allocation and script execution time to process those rows. PHP takes data into its allocated memory on ser ..read more
Visit website
Form validation and user input sanitization tricks in laravel
Decode Web
by Dinesh Suthar
4y ago
A web application is hosted on a server, as we all know. General public can access a web application through browser, mobile application and many other ways. So if anyone is hosting his application for public use then he pays for the server resources. Let’s put aside general user authentication part because hacker can simply signup to an application, what if the owner/developer of the application is not well versed will input security. Then simply, username field can accept email and vise versa. Getting my point ? Security is the very first step a web developer thinks of. Be it data securi ..read more
Visit website
List of the artisan commands, developers are still confused even after release of laravel 6
Decode Web
by Dinesh Suthar
4y ago
Hello friends, long time no see ? hehe, I really apologize for the late post after my last article on multi guard authentication. I was quite busy on multiple projects at work. As we all know Taylor Otwell has released a major version of his masterpiece, Laravel 6 recently. Quite impressive, but even though Laravel has moved to version 6 most of the developers are still confused about some of the artisan commands which are the core of Laravel CLI operations. php artisan route:clear This command when fired, will clear your cached routes in web.php and api.php. Next time when laravel is b ..read more
Visit website
Multi guard authentication in laravel 5.8
Decode Web
by Dinesh Suthar
4y ago
Here is another interesting topic of guard in laravel we are going to cover in this post. As we all know user authentication can be achieved in jiffy, that is, run php artisan make:auth and you will get controllers, blade views all ready to launch with authentication. But..but.. Here is the catch. Laravel provides default authentication on User model or users table, what if there are two types of users completely different to each other, for example application users and admins ? One thing we can do is, make a column in users table with name as type and there we define type of user, 1 ..read more
Visit website
A
by
ago
A ..read more
Visit website

Follow Decode Web on FeedSpot

Continue with Google
Continue with Apple
OR