Laravel


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

Laravel 5 - An access token is required to delete a video - issue

Someday ago. i was working on my laravel project and client need to upload video to youtube using google youtube api. Client ask me about this do you think you can upload video to youtube using package in laravel. I simply say yes because i know package and i thought it will be easy to do. But finally i started work on it and i used <a href="https://github.com/JoeDawson/youtube" target="_blank">.....

Posted On July 6, 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

Laravel 5 - Populate select box from database example

we always require to generate dynamic select box from database table like if you have users table and you require to generate drop down box on all users from database. So in this article i will let you know how to populate drop down list from database. In this example, i simply created users table and added some dummy data. Then i will populate select box using laravel model. So let's see bellow .....

Posted On June 25, 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

Blog Search