Laravel

Laravel Custom validation example?

$messages = [ 'builder_code.required' => 'Please enter builder code!', 'builder_code.exists' => 'Please enter valid builder code!', 'plan.required' [...]

Whats new in laravel version 5.6 ?

Single Server Task Scheduling If you have a task scheduler running on multiple servers, the task will run on each server. You can indicate that a task should [...]

Install doctrine in laravel?

composer require "laravel-doctrine/migrations:1.0.*" After updating composer, add the ServiceProvider to the providers array in [...]

Setup Multiple Database Connection in Laravel ?

Example : Step1: Add following code in database.php (path : config/database.php) 'mysql_2' => [ 'driver' => 'mysql', 'host' => env('DB_HOST_2', [...]

How to create modular based application in laravel ?

Solution: Step1: Create Folder "Modules" inside "app/" Step2: Module1( suppose admin ) -Controllers -Views -Models -routes.php Module2( suppose API [...]

HOW TO VALIDATE STRONG PASSWORD VALIDATION IN LARAVEL ?

Solution : $messages = [‘password.regex’ => “Your password must contain 1 lower case character 1 upper case character one number”]; [...]

How to integrate multi langauge in laravel5.2 ?

Step by step solution : Step1 : Add Laravel Localization to your composer.json file “mcamara/laravel-localization”: “1.1.*” Step2 : Run composer [...]

How to Remove public from URL and remove index.php from URL in laravel ? Step by step solution.

Solution : Step1 : open public folder and copy index.php step2 : Paste index.php to root of your laravel folder (suppose your laravel folder name is [...]

How to create or use multi Auth in laravel 5.2

Solution : Step1: Now open config/auth.php and make the following changes. Step2 : 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => [...]

How to convert html to PDF in laravel ?

Solution : Step1 :  add following to your composer.json file "barryvdh/laravel-dompdf": "0.6.*", step2: update your composer using command. composer [...]

Sort multi dimension array in php

solution [...]

Export Excel file in laravel

1. Put this export button code in the view Export 2. Put this code in the [...]

How to validate files,image and mime type in laravel

$validator = Validator::make($request->all(), [ 'Picture' => 'required|image|mimes:jpeg,bmp,png,gif,PNG,jpg', // Picture is name of file you set in [...]

How to upload file in Laravel

Here is example for upload file in larave : public function user() { $user = new User; $form_input = Input::all(); if (Input::hasFile('Picture')) { [...]

Password Hashing in Laravel

Password Hashing Use Hash; at top in your controller Now Write code in your method [...]

Delete record from database ORM laravel

Delete record from database ORM laravel Example User::destroy($user_id); User is Model name $user_id is id to delete particular user [...]

Laravel Routing

All Laravel routes are defined in the app/Http/routes.php file, which is automatically loaded by the framework. The most basic Laravel routes simply accept a [...]

Laravel Installation

Requirements PHP >= 5.5.9 OpenSSL PHP Extension PDO PHP Extension Mbstring PHP Extension Tokenizer PHP Extension Install Xampp First [...]