Laravel Custom validation example?

$messages = [ 'builder_code.required' => 'Please enter builder code!', 'builder_code.exists' => 'Please enter valid builder code!', 'plan.required' => 'Please select project plan!', 'name.required' => 'Please enter project name!', 'location.required' => 'Please enter project location!', //'status_date.*.required' => 'Please enter [...]

Read more

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 only run on one [...]

Object Oriented Programming in PHP.

List of Topic/Chapter For OOP In PHP   Topics Description Basics of OOP in PHP In this part of tutorial you will learn about the very basic concept of [...]

How to create Entities from database schema using doctrine in laravel ?

Step 1. Run this command php artisan doctrine:convert:mapping –from-database annotation app/Entities This command will read  database schema and create the entities with [...]

Command to create migration file?

php artisan doctrine:migrations:generate [--create=table_name] [--table=table_name] [...]

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', [...]

Install Php7,Apcahe and Mysql 5.6 on ubuntu 16.06 ?

  Install PHP 7 First install python-software-properties package on your system which provides add-apt-repository command then use the following set of commands to add [...]

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 [...]


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

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 install to get the [...]

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 laravel_project, just put [...]

Jquery Bootstrap Datepicker disable past dates except n number of dates

Suppose if we want to disable all the past dates except last 7days from the current date. you can do it like this jQuery(document).ready(function () { var nowDate = new [...]

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 update or php [...]

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 route [...]

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 form // Its [...]

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')) {  // checking is [...]

How to Increase the Maximum File Upload Size in PHP

Use following code on your php file. @ini_set( 'upload_max_size' , '64M' ); 2 @ini_set( 'post_max_size', '64M'); 3 @ini_set( [...]

How do I increase the PHP upload limits

Try increasing the following values in php.ini, for example: memory_limit = 32M upload_max_filesize = 24M post_max_size = 32M After making these changes, you may need to [...]