HDTuto.com

Laravel 5


Laravel - How to handle "No query results for model" Error

Laravel - How to handle "No query results for model" Error Yesterday, I was just working on my restful API with User model and I found following error on show method: "No query results for the model [App\\User] 1", first I search on google about No query results for a model issue and fix that. but I want to understand why this error comes. i found why No query results for the model is an error on.....

Posted On March 14, 2018

Laravel 5.6 - Get last inserted id using save(), create() and insertGetId()

If you have experience with PHP Project developing then you know we almost require to get last id. so if you need to get last insert id then you can get save(), create() and insertGetId() method in laravel 5.6 application. here i will give you three way to get last inserted id or object in laravel 5.6 application. So in this small article i will give you three example for getting last insert id:.....

Posted On March 13, 2018

Laravel 5.6 - Excel and csv import export using maatwebsite example

Hi, Web Artists, In today’s Tutorial, I will show you code of How to import and export data in CSV and Excel file in Laravel 5.6 application. This example is simple laravel 5.6 import excel file to the database using maatwebsite. you need to just follow few steps and get a full example of import CSV file in laravel 5.6 application. We will use maatwebsite composer package for import-export .....

Posted On March 10, 2018

How to get last query log in Laravel 5.6?

Hi Developer, In this article, i will let you know how to get last query log in laravel 5.6 application. we can simply get last mysql query log from model eloquent query. So if you need to see what you execute last mysql query then you need to follow this tutorial. If you need to debug your last mysql query in laravel 5.6 then you can do it simply by following example. We know laravel provide th.....

Posted On March 8, 2018

PHP Laravel 5.6 get current user details

we always require getting current logged in user data in laravel 5.6 app. I will show you how to get current user data like name, id, email, address etc by using laravel auth. I will give you two way to get current user data using laravel authentication. you can simply get logged in user details in controller or view blade files. As you would like to get it. So, we can get current user details us.....

Posted On March 1, 2018

How to create PDF file in Laravel 5.6?

Hi Developer, here is an available simple example of generating pdf file from laravel blade view using barryvdh/laravel-dompdf composer package in Laravel 5.6 application. You just need to follow step and get to generate pdf file. Here we will install barryvdh/laravel-dompdf composer package and then add laravel facade and provider. I give you also simple example to generate pdf file from blade .....

Posted On February 27, 2018

How to get routes lists in Laravel 5 ?

Hi Guys, in this article, I will explain how to get all routes lists using getRoutes() in Laravel 5 app. we can simply get registered routes in laravel 5.6 application. we will use Route facade with getRoutes() method for getting all list of routes. If you require to generate and get all list of routes then you can get it by using this way : "Route::getRoutes()" , Then you can simply get follow.....

Posted On February 27, 2018

PHP Laravel 5.6 JQuery Ajax Pagination Tutorial

In this article, I demonstrate with you how to create jquery ajax pagination in laravel 5.6 application. we will create paginate using laravel 5.6 links() helper. pagination is code part of every application and if it is with ajax then awesome. So let's see jquery ajax pagination example below. As we know, today ajax is more useful because everyone wants to his web application should be work fa.....

Posted On February 23, 2018

Image Upload with Validation in PHP Laravel 5.6

Hi Developer. In this tutorial, I will let you know how to image upload in laravel 5.6. I will explain file uploading with validation like image, mimes, max file upload etc. you have to just follow below step and get a full example of image upload in laravel 5.6. In this article, i will create two routes one forget method and another for post method. I created a simple form with file input. So yo.....

Posted On February 21, 2018

PHP Laravel 5.6 Simple Validation example with error message

In this tutorial, I will let you know how to implement simple form validation example with print error messages in laravel 5.6 application. I will show you simple example of form validation with custom error messages. As we all know website is always depend on user input, So it's required to add validation for that otherwise client or user does not input wrong details or something, So for exampl.....

Posted On February 16, 2018