Laravel


Laravel 5.5 get current user data using Auth

Few days ago laravel launch 5.5 version and there are lot's of new changes and new feature. In this example i will let you know how to get current logged in user details like id, email, name etc. laravel doesn't change for getting current logged in user details. So, we can get current user details using laravel auth. You can also use simple auth helper or Auth facade. So i will give you both exam.....

Posted On August 19, 2017

Laravel return view ajax request example

Sometime, we may require to return view from controller via jquery ajax request in Laravel 5 application. So in this example i will let you know how to generate view from controller and return it. Here, i will create two blade file and another controller method so you have to just follow bellow example. Here bellow blade file. <strong>blade file:</strong> <pre> <!DOCTYPE html> <html> .....

Posted On August 8, 2017

Laravel convert object to string example

Hey, Sometimes, we require to convert object to string value, but it's need to very rare case. But if you require to convert laravel eloquent object then you can do it using "(string)". In this example i will show you how to do this. So, let's see bellow example. I simply get users data using all() method of User model. After that get i will convert that object collections data into string. So l.....

Posted On August 5, 2017

Laravel convert object to json example

Hello, Friends. In today laravel framework become more and more popular. we almost require all the things do in php application. So in this post i am going to tell you this type of small things like if you have data in object and you want to convert then into json then how you can do this ? in this example i will know you how to convert std collections objects convert into json. Sometime we have .....

Posted On August 5, 2017

Convert object to array in laravel 5 example

Hi, Guys. As we know today market php laravel framework become more and more popular and php developer like to work too. we almost require all the things do in php application. So in this post i am going to tell you this type of small things like if you have data in object and you want to convert then into array then how you can do this ? However, in this post i will let you know how to convert .....

Posted On August 5, 2017

Laravel 5 Get Site URL Examples

In this article i will let you know how to get homepage or site url in your controller, blade file, model etc. So as we know we may need to get base url of our website then we can get it several way in laravel 5 application. Here, i will give you several examples of how to get base url in view file or controller etc. So you can use any as your requirement or work as you expect. So simply let's se.....

Posted On August 2, 2017

Laravel schema default current timestamp value example

Some days ago, i was working my laravel 5.4 application and i require to create new migration with create_at column only, update_at was no more require. So i decided to set default current timestamp value to created_at column. But i was thing how is it possible to set default current timestamp to created_at column using laravel schema. i started to read docs and i found useCurrent() of schema bu.....

Posted On August 1, 2017

Guzzle http client GET and POST request example in Laravel 5

today we will learn how to send request to server using Guzzle http client in laravel 5 application. As we know sometimes we require to use api of other website like facebook, instagram, wordpress etc, and we have to use their api then we have to two options curl and another is http guzzle. So i think laravel provide Guzzle http client composer package and it's amazing. we simply use that package .....

Posted On July 31, 2017

Laravel 5 Chart example using Charts Package

It's always good fit for understand if we use some graphical way display our progress report using chart. So if you are working with laravel 5 framework then you can use chart very simple way and best layout. There are several js library available for chart like chartjs, highcharts, google, material, chartist, fusioncharts, morris, plottablejs etc. in this example we will just use one laravel "Con.....

Posted On July 29, 2017

Laravel 5 datatables example from scratch

Data Tables is a plug-in for the jQuery Javascript library. DataTables provide us flexibility to search, list, sort and pagination using jquery. We can also simply use ajax with datatables too. So in this tutorial, i will tell you how to use datatables in laravel 5 application, after this you can simply use with all version like 5.1 to upcomming laravel 5.5 So, in this example i will use yajra/la.....

Posted On July 26, 2017

Blog Search