Today’s tutorial I will show you how to work on ajax file upload with progress bar in Laravel. File uploads are pretty much everywhere in today’s web/mobile applications. For example, in Facebook profile users want to add a photo, or in twitter handle users want to show an event picture etc. Let’s start with create…Continue Reading
Laravel
Eloquent date filtering using whereDate()
As like any other PHP frameworks Laravel has certain ways to filter the data by date. Let’s say you need to filter data set based on today. So I assume you have a field created_at in your database table. Consider this simple set of functions below, it fetches all the records dated today. Apparently, this…Continue Reading
Laravel 8 Create Custom Helper Functions (Global function)
This article helps you to create a custom helper function in Laravel. You may have noticed some functions in Larave do not need to import the classes, and it’s not attached with any class name, such as optional(), route() etc. These are so called helper functions.
Automatically Set a Local Timezone for Users In Laravel
Laravel Timezone is a great package by James Mills which sets users timezone in an application and show it based on their timezone. This package listens for the event and will automatically set a timezone on your user model. This brillaint package uses the torann/geoip package which looks up the users location based on their…Continue Reading
Force HTTPS with a Middleware in Laravel
Secured URLs has a key role to secure your web application in many ways. In my opinion, you should always serve the content via a secure URL and this is one of many ways to prevent from exploits. Oftentimes, applications will have a secure URL and URL without HTTPS. So our application needs to decide…Continue Reading
Difference between Laravel’s raw SQL functions
Laravel comes with a lot of helper functions to interact with Database efficiently . There are Eloquent which composes an ORM model, and helps to write expressive relations and queries. But some cases that’s not enough, we have to have some raw queies need to write to achieve the results. So in this article we…Continue Reading
Laravel date set timezone
In ‘timezone’ => ‘Asia/Kolkata’ Laravel date set timezoneHow to create console command in laravel ?Show a number in two decimal places in PHPPHP str_replace() FunctionHow to delete file from public folder in Laravel?How to run Laravel validation if the field is not empty?How to add custom CSS to head section in Magento 1 ?Append an…Continue Reading
How to clear laravel.log in Laravel?
laravel.log is a file that contains logs from various actions in laravel framework. This file is usually located in To clear laravel.log you could use the below methods easily.
How to create a custom console command (artisan) for Laravel
Laravel’s Aritsan(command-line interface) is well known among developers as commands are always very handy to achieve results. Laravel is not different, comes with very good setup for extending their core command interface. In Laravel, commands are generally saved in the folder. In this article, you’ll learn how to create a custom command for artisan easily…Continue Reading
Hierarchical Tree view Category Example in Laravel
For most of the projects you work on in PHP or in any language, there you have to encounter categories and subcategories. When comes to categories, the tree view is the best listing method that we can use in our web apps. In this article, we are showing you how to create a Laravel tree…Continue Reading
How To Install And Use CKEditor In Laravel?
Today’s tutorial, we will show you how to use CKeditor in Laravel. CKEditor is a WYSIWYG HTML editor which allows us to write rich text formats. We can have HTML elements in the textarea, but it doesn’t have formatting options. Updating this HTML in textarea needs expertise in HTML/CSS. That’s why we have CKeditor, which…Continue Reading
Laravel Auth: Login with username instead of Email
Setup Project Update the .env file with your desired database details. Run the following command to create the scaffold for authentication pages. Next, we want to add our new field, username to our database migration structure. Open this file database/migrations/create_users_table.php. Add the username field in the up() function after the name field. So the final…Continue Reading
What is Laravel Mass Assignment, Guarded or Fillable?
When you work with Laravel you may have heard Mass Assignment, Guarded or Fillable. In this article, we will go through each term in detail.
How to Use reCAPTCHA in Laravel 5 Forms For Validation
There are plenty of options to prevent spam, but captcha is one of the best to use. When talking about captcha, the first thing will be in mind is weird characters seen on the online forms. Here we talk about Google’s Recapthca integration to your Laravel application.
How to get Query Strings Value from a URL in Laravel 5.5?
When you work with Laravel it is very common to get query string values from URL. In native PHP you can get this via $_GET variable. But when you want to get Query strings from a URL in Laravel you can use the below methods. Either you can use Request Facade or Input facade in…Continue Reading
How to enable image uploader in CKeditor 4 in Laravel 5
CKEditor is one of the best WYSIWYG editor available for your websites. Today’s tutorial I will show you how to use image upload in CKEditor using Laravel. This option let you upload an image from your computer or a direct link from other website. You can see the result of the tutorial as shown in…Continue Reading