Category: Laravel

Laravel 5 – Remove public from URL

When you install Laravel in your server you will get URL like this to list your customers I need somethig like this This is the solution. You have to do two things to remove “public/index.php” from the URL 1 Rename server.php in your Laravel root folder to index.php 2 Copy the .htaccess file […]

Read more

How to get raw Exception Message in Laravel?

If you want to get raw exception message without HTML code in Laravel you can use the following method $e->getMessage() This is the sample code for it

Read more

Laravel Test Driven Development

In following Youtube series you can learn the the TDD with Laravel Part 1 Introduction, PHPUnit Setup & Books Test Part 1 Part 2 Deleting a Record, Asserting Instance Of & Carbon Parse Part 3 Implementing a firstOrCreate Author Record With TDD Part 4 Book Checkout & Book Checkin Flow With TDD

Read more
Laravel API Request Validation

Laravel Api Request validation

Laravel Api Request validation to get 402 status code. You can use the following code when you validate your REST Api.

Read more

Vee Validate show errors by REST API server messages Laravel + Vue.js

In your Laravel + Vue Application, you have to do two validations to make error-free application 1 Client side validation 2 Server side validation We are using popular Vee Validate Vue.js package for the client-side validation. In this article, I am going to show you how you can do the server-side validation and show the […]

Read more

How to create model with resource-full controller

In Laravel, you can create Model with resorcefull controller easily by using the following command in your terminal If you want to create model with a controller you can use the followng command

If you want to create Resourefull controller you can use the following command

If you need to create model,controller and […]

Read more

Laravel Model Observer

What is Observer? In Laravel, you can listen to events on a Model. For example, when you update the model product, it will fire the event updated. You can listen to these events and write some code to executes when they fire. There are several events like creating, updating, deleting etc. So you can group […]

818 total views, no views today

Read more

JSON request to Laravel RESTFull API end point

If you want to send JSON request to Laravel RESTFull API end point, you can set he header as shown in the following image. We are using POSTman to show he example Set Accept to application/json With above request you can use the following code in your project

Read more

Beginning JWT in Laravel

Intsall the followoing package in your Laravel project First you can install the third-party JWT package by running the following command in your terminal

Open config/app.php and add the following provider to the providers array:

Use the following command to publish JWT provider

Now you can use following command to generate […]

Read more

Laravel and Vue.JS Installation

We will try to install the Laravel latest version which comes Vue.js 1 First thing you have to install the composer if you already have not installed in your computer 2 Next you can run following command in your terminal

This will download the composer file to install the Laravel project 3 Now you […]

Read more