Laravel


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

Laravel 5 Passport - Key path oauth-public.key does not exist or is not readable solved.

When i was working with laravel passport in my application. In my local system works, but when i upload it to git and my friend pull and run project he got it error as following : <strong>Key path "file://F:\xampp\htdocs\blog\storage\oauth-public.key" does not exist or is not readable</strong> I was thinking, what is issue because i already installed successfully laravel passport. But i finally i.....

Posted On May 20, 2017

Laravel 5 - Change JSON response to request with wrong api token.

If you used laravel 5 passport then i am sure you require to use "auth:api" middleware, But you can see when you pass wrong api token then you just get "unauthenticated" json response with error key. If you want to change message or json formate then you can do it. You have to on on default Exceptions handler file and you can change there. So just open your Handler.php file and change json respo.....

Posted On May 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 check if ajax request or not example

In this article, i will share with you how to check request is ajax on not in laravel 5 application. We maybe need to determine if request is ajax then response should be in json and id using http request then return view. So at that time need to determine request. In this example you will lean how to check if request is ajax or not. Laravel provide ajax() method of Request Facade to identify re.....

Posted On May 8, 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

Laravel full calendar tutorial example from scratch

In this example you will learn how to implement fullcalendar(JavaScript Event Calendar) in Laravel 5 application. we would like to represent our events, schedule, tasks etc on calendar that way we can see when starting time and ending time. In this article we will use fullcalendar jquery plugin for display events in laravel application. It is very easy to implement. Example is from scratch so yo.....

Posted On May 6, 2017