Category Laravel

If laravel url is not working on server

if laravel url is working like index.php/user but not working in /user

If Cron not run automatically on server in laravel

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application

laravel-cors package that allows you to send Cross-Origin Resource Sharing headers with Laravel middleware configuration.

Swagger with GET, POST and Multipart Upload file Example

SSL certificate error: unable to get local issuer certificate in curl

Add These Two line

in Laravel open vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php
and change this

to

Use Custom Class in Laravel

1. Add a new folder inside the app folder on the Laravel project folder that we created. For example, I created a folder named CustomClass

Create Custom Class Laravel Framework

2. Add a new file in the CustomClass folder with the name record_log.php

3. Fill in the following class code in the record_log.php file

Create New Package in Laravel

1. New package directory

Create a directory with a name of the package. I will call it laravel-log-enhancer.

2. composer.json

Every package starts with a composer.json file. Let’s create it. The easiest way to create it is to fire the init command.

Or you can just copy it from this stub and make changes accordingly.

Create dynamic database and its use in laravel

Step 1

Go to config/database.php and update like this

Use Multiple Database in laravel

Step 1

Go to config/database.php and update like this

Install Swagger in Laravel

1 step: Create Laravel 5 Project

2 step: Install Swagger Package

Or you can install specific verion

For use of @SWG annotation we are going to install the following package