PHP code example of nestermaks / laravel-pricelist
1. Go to this page and download the library: Download nestermaks/laravel-pricelist library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nestermaks / laravel-pricelist example snippets
// config for Laravel Pricelist
return [
/////////////////////////////////////////////
//Locales for Astrotomic/laravel-translatable
/////////////////////////////////////////////
'locales' => [
'en',
'ru',
'uk',
],
///////////////////
//API routes prefix
///////////////////
'api' => 'nestermaks-api',
//////////////////////////
//Pricelists routes prefix
//////////////////////////
'pricelists' => 'pricelists',
///////////////////////////////
//Pricelist items routes prefix
///////////////////////////////
'items' => 'pricelist-items',
////////////////////////////////////////////////
//Items amount shown when index method is called
////////////////////////////////////////////////
'pricelists-per-page' => 10,
'pricelist-items-per-page' => 10,
///////////////////////////////////////////////
//Validation rules for store and update methods
///////////////////////////////////////////////
'store-pricelists' => [
'title' => ['ctive' => ['boolean']
],
];
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Nestermaks\LaravelPricelist\HasPricelist;
class Offer extends Model
{
use HasPricelist;
...
}