PHP


How to change log file path in Laravel 5 ?

In Laravel framework, they store all error store in logs file and they keep in storage folder. Logs will help to find where is error and why in details. Because in every exception it put automatically in log file. You can also put manually log like as bellow few examples: <pre> Log::info('Info Log'); Log::alert('Alert Log'); Log::error('Error Log'); </pre> As above and there are others also avail.....

Posted On July 7, 2017

How to send email using gmail in PHP Laravel 5?

Laravel is very popular framework of php in todays. Laravel is famous because they provide several goods things like MVC, routing, mail etc. In this article we will learn how to send email using SMTP driver. Laravel 5 provide several drivers options like SMTP, Mail, SendMail and services supported include Mailgun, Sendgrid, Mandrill, Amazon SES, etc. So, here i will let you know how to send email.....

Posted On July 7, 2017

How to remove file if exists from folder in Laravel 5?

We almost require to file upload or image upload function in our laravel application. We simply make image upload functionality and put that image om our upload directory. But when record will delete from database then it should be remove from folder too otherwise there are several useless images store. So, in this article i will let you know how to check file exists or not then delete image or .....

Posted On July 6, 2017

Laravel 5 - Summernote Wysiwyg Editor with Image Upload Example

Summernote Wysiwyg is very simple and cool editor. If you use simply textarea and you require to make more tools like bold, italic or image upload, Then you have to choose Summernote plguin. In this article, i will let you know how to use summernote editor in our laravel 5 application. In this example i am going to use summernote with bootstrap. So you can simply use summbernote editor. If you .....

Posted On July 5, 2017

How to return response text/html from controller in laravel 5?

Few days ago, i was working on my new project and project was migrate project php into laravel. I need to migrate apis, So in old php application it returns response as text and i have to keep same response in laravel 5.4 application. So i thought how we can do it, finally i got it, we can do it using response(). response() helper will help to return simple text. So in my php it was like as bello.....

Posted On July 4, 2017

How to get all tables lists of database in Laravel 5 ?

Here, we fetch all tables names with prefix from database using laravel DB facade. So if you require to get all tables then you are at right place. As we can get simply all table lists by following sql query: <pre> SHOW TABLES </pre> In Laravel 5 application we will use same above query by using laravel DB select method. So let's see bellow example: <strong>Example:</strong> <pre> $tables = \DB.....

Posted On July 3, 2017

How to get all dates between two dates in PHP Carbon ?

Few days ago i was working on my laravel web application and i need to retrieve all dates between date range. I had two days and i need to get all date between those two dates. I tried to search on google and finally i found solution using php carbon and it's perfect fit for my laravel app. So i simply done by write code on like as bellow code, I added my two dates on carbon object and then call .....

Posted On June 27, 2017

PHP Laravel 5 - Get User Agent Value from Request

In this article, i am going to show you how to get user agent from user request in laravel 5.4 application. PHP Laravel framework did several update from their other version. we will see how we can get user agent value from request object. Laravel 5 introduce Request object that provide user request details. So, let's see bellow two way to get user agent value form laravel 5 application. <strong.....

Posted On June 17, 2017

Laravel autocomplete typeahead search example from scratch

In this article, i will show you how to create jquery ajax autocomplete using typeahead js plugin in Laravel 5 application. If you have thousands of data in database table and you require to display in drop-down or something like to choose that data. So If you use drop-down it load and it's hard to find specific record. So At that time you can simply use jquery autocomplete in your application. I.....

Posted On May 10, 2017

Laravel 5 - Create Simple CRUD(Create Read Update Delete) application example

In this tutorial, i am going to share with you how to create CRUD module in laravel 5 application. CRUD stand for Create, Read, Update and Delete. As we know crud module is always require for basic data input in database. In this example i created "posts" module. i make posts table with title and content column. You can add post, view post, edit post and remove that post. I follow laravel rules .....

Posted On May 7, 2017

Blog Search