if laravel url is working like index.php/user but not working in /user
1 2 |
// run this command sudo a2enmod rewrite |
if laravel url is working like index.php/user but not working in /user
1 2 |
// run this command sudo a2enmod rewrite |
1 2 |
// run this command * * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1 |
laravel-cors package that allows you to send Cross-Origin Resource Sharing headers with Laravel middleware configuration.
1 |
composer require barryvdh/laravel-cors |
Add These Two line
1 2 |
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); |
in Laravel open vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php
and change this
1 2 |
$conf[CURLOPT_SSL_VERIFYHOST] = 2; $conf[CURLOPT_SSL_VERIFYPEER] = true; |
to
1 2 |
$conf[CURLOPT_SSL_VERIFYHOST] = 0; $conf[CURLOPT_... |
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
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
1. New package directory
Create a directory with a name of the package. I will call it laravel-log-enhancer
.
1 |
mkdir laravel-log-enhancer && cd 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.
1 |
composer init |
Or you can just copy it from this stub and make changes accordingly.
Go to config/database.php and update like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
'mysql_2' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), '... |
Go to config/database.php and update like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
'mysql_2' => [ 'driver' => 'mysql', 'host' => env('DB_HOST_2', '127.0.0.1'), |
1 |
composer create-project laravel/laravel l5swagger |
1 |
composer require darkaonline/l5-swagger |
Or you can install specific verion
1 |
composer require "darkaonline/l5-swagger:5.8.*" |
For use of @SWG annotation we are going to install the following package
... |