Clean + Update PHPCS.xml + PHPCBF
This commit is contained in:
parent
94374cf378
commit
f4f3256ce5
99 changed files with 955 additions and 1204 deletions
23
README.md
23
README.md
|
|
@ -6,7 +6,6 @@ php artisan storage:link
|
|||
cp .env.example .env
|
||||
php artisan key:generate
|
||||
composer install
|
||||
php artisan vendor:publish --provider="JoeDixon\Translation\TranslationServiceProvider"
|
||||
```
|
||||
- Créez la base de données
|
||||
- Éditez le .env
|
||||
|
|
@ -24,25 +23,3 @@ Put every min in PROD :
|
|||
```
|
||||
php artisan schedule:run
|
||||
```
|
||||
|
||||
## déploiement du switch de stockage des traductions joedixon/laravel-translation de file vers database
|
||||
```
|
||||
php artisan translation:sync-translations
|
||||
```
|
||||
paramètres à entrer :
|
||||
|
||||
translation::translation.prompt_from_driver:
|
||||
> file
|
||||
|
||||
translation::translation.prompt_to_driver:
|
||||
> database
|
||||
|
||||
translation::translation.prompt_language_if_any:
|
||||
|
||||
laisser vide le dernier paramètre pour traiter toutes les langues.
|
||||
|
||||
Résultat
|
||||
```
|
||||
translation::translation.syncing
|
||||
Translations have been synced 😎
|
||||
```
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ class AdminCreate extends Command
|
|||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @return integer
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$role = 0;
|
||||
$name = $this->ask('Name ?');
|
||||
$email = $this->ask('Email ?');
|
||||
$role = 0;
|
||||
$name = $this->ask('Name ?');
|
||||
$email = $this->ask('Email ?');
|
||||
$password = $this->secret('What is the password?');
|
||||
|
||||
$user = new User([
|
||||
|
|
|
|||
|
|
@ -13,18 +13,17 @@ class Kernel extends ConsoleKernel
|
|||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
//write schedules here
|
||||
// write schedules here
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
|||
class ConfirmPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirm Password Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password confirmations and
|
||||
| uses a simple trait to include the behavior. You're free to explore
|
||||
| this trait and override any functions that require customization.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirm Password Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password confirmations and
|
||||
| uses a simple trait to include the behavior. You're free to explore
|
||||
| this trait and override any functions that require customization.
|
||||
|
|
||||
*/
|
||||
use ConfirmsPasswords;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
|||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset emails and
|
||||
| includes a trait which assists in sending these notifications from
|
||||
| your application to your users. Feel free to explore this trait.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset emails and
|
||||
| includes a trait which assists in sending these notifications from
|
||||
| your application to your users. Feel free to explore this trait.
|
||||
|
|
||||
*/
|
||||
use SendsPasswordResetEmails;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
|||
class LoginController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Login Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles authenticating users for the application and
|
||||
| redirecting them to your home screen. The controller uses a trait
|
||||
| to conveniently provide its functionality to your applications.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Login Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles authenticating users for the application and
|
||||
| redirecting them to your home screen. The controller uses a trait
|
||||
| to conveniently provide its functionality to your applications.
|
||||
|
|
||||
*/
|
||||
use AuthenticatesUsers;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ use Illuminate\Support\Facades\Validator;
|
|||
class RegisterController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles the registration of new users as well as their
|
||||
| validation and creation. By default this controller uses a trait to
|
||||
| provide this functionality without requiring any additional code.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller handles the registration of new users as well as their
|
||||
| validation and creation. By default this controller uses a trait to
|
||||
| provide this functionality without requiring any additional code.
|
||||
|
|
||||
*/
|
||||
use RegistersUsers;
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ class RegisterController extends Controller
|
|||
/**
|
||||
* Get a validator for an incoming registration request.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
|
|
@ -58,7 +58,7 @@ class RegisterController extends Controller
|
|||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\ResetsPasswords;
|
|||
class ResetPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset requests
|
||||
| and uses a simple trait to include this behavior. You're free to
|
||||
| explore this trait and override any methods you wish to tweak.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password reset requests
|
||||
| and uses a simple trait to include this behavior. You're free to
|
||||
| explore this trait and override any methods you wish to tweak.
|
||||
|
|
||||
*/
|
||||
use ResetsPasswords;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\VerifiesEmails;
|
|||
class VerificationController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Email Verification Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling email verification for any
|
||||
| user that recently registered with the application. Emails may also
|
||||
| be re-sent if the user didn't receive the original email message.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Email Verification Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling email verification for any
|
||||
| user that recently registered with the application. Emails may also
|
||||
| be re-sent if the user didn't receive the original email message.
|
||||
|
|
||||
*/
|
||||
use VerifiesEmails;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class AdviceController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Advice $advice
|
||||
* @param \Illuminate\Http\UpdateAdviceRequest $request
|
||||
* @param Advice $advice
|
||||
* @param \Illuminate\Http\UpdateAdviceRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Advice $advice, UpdateAdviceRequest $request)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class EncartsController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Encart $encart
|
||||
* @param \Illuminate\Http\UpdateEncartRequest $request
|
||||
* @param Encart $encart
|
||||
* @param \Illuminate\Http\UpdateEncartRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Encart $encart, UpdateEncartRequest $request)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class GammesController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$gammes = collect([]);
|
||||
$gammes = collect([]);
|
||||
$dbGammes = Gamme::orderBy('title')->whereNull('parent_gamme_id')
|
||||
->with('childGammes')->get();
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ class GammesController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreGammeRequest $request
|
||||
* @param \Illuminate\Http\StoreGammeRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StoreGammeRequest $request)
|
||||
|
|
@ -90,8 +90,8 @@ class GammesController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\UpdateGammeRequest $request
|
||||
* @param Gamme $gamme
|
||||
* @param \Illuminate\Http\UpdateGammeRequest $request
|
||||
* @param Gamme $gamme
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Gamme $gamme, UpdateGammeRequest $request)
|
||||
|
|
@ -116,7 +116,7 @@ class GammesController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Gamme $gamme
|
||||
* @param Gamme $gamme
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Gamme $gamme)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use App\Http\Controllers\Controller;
|
|||
class HomeController extends Controller
|
||||
{
|
||||
// BO
|
||||
|
||||
public function home()
|
||||
{
|
||||
return view('back.home');
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ class MomentsController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Moment $moment
|
||||
* @param \Illuminate\Http\UpdateMomentRequest $request
|
||||
* @param Moment $moment
|
||||
* @param \Illuminate\Http\UpdateMomentRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Moment $moment, UpdateMomentRequest $request)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class PictoBrandsController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StorePictoBrandRequest $request
|
||||
* @param \Illuminate\Http\StorePictoBrandRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StorePictoBrandRequest $request)
|
||||
|
|
@ -70,8 +70,8 @@ class PictoBrandsController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param PictoBrand $pictobrand
|
||||
* @param \Illuminate\Http\UpdatePictoBrandRequest $request
|
||||
* @param PictoBrand $pictobrand
|
||||
* @param \Illuminate\Http\UpdatePictoBrandRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(PictoBrand $pictobrand, UpdatePictoBrandRequest $request)
|
||||
|
|
@ -93,7 +93,7 @@ class PictoBrandsController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param PictoBrand $pictobrand
|
||||
* @param PictoBrand $pictobrand
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(PictoBrand $pictobrand)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class PictosController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StorePictoRequest $request
|
||||
* @param \Illuminate\Http\StorePictoRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StorePictoRequest $request)
|
||||
|
|
@ -47,8 +47,8 @@ class PictosController extends Controller
|
|||
if (is_a($request->picture, "SplFileInfo")) {
|
||||
$picto->picture = Utils::storeImage($request->picture, $picto->getTable());
|
||||
}
|
||||
//on ne peut pas arbitrairement créer tous les pictos à cet endroit
|
||||
//j'ai du décommenter cette ligne pour la création picto fonctionne
|
||||
// on ne peut pas arbitrairement créer tous les pictos à cet endroit
|
||||
// j'ai du décommenter cette ligne pour la création picto fonctionne
|
||||
$picto->page = Page::marqueBloc2();
|
||||
|
||||
if (!$picto->saveOrFail()) {
|
||||
|
|
@ -72,8 +72,8 @@ class PictosController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Picto $picto
|
||||
* @param \Illuminate\Http\UpdatePictoRequest $request
|
||||
* @param Picto $picto
|
||||
* @param \Illuminate\Http\UpdatePictoRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Picto $picto, UpdatePictoRequest $request)
|
||||
|
|
@ -95,7 +95,7 @@ class PictosController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Picto $picto
|
||||
* @param Picto $picto
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Picto $picto)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class PostsController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StorePostRequest $request
|
||||
* @param \Illuminate\Http\StorePostRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StorePostRequest $request)
|
||||
|
|
@ -75,8 +75,8 @@ class PostsController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\UpdatePostRequest $request
|
||||
* @param Post $post
|
||||
* @param \Illuminate\Http\UpdatePostRequest $request
|
||||
* @param Post $post
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Post $post, UpdatePostRequest $request)
|
||||
|
|
@ -105,7 +105,7 @@ class PostsController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Post $post
|
||||
* @param Post $post
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Post $post)
|
||||
|
|
@ -120,8 +120,8 @@ class PostsController extends Controller
|
|||
/**
|
||||
* Change on_top column to a post if necessary
|
||||
*
|
||||
* @param Boolean $isCurrentPostOnTop
|
||||
* @return Boolean response
|
||||
* @param boolean $isCurrentPostOnTop
|
||||
* @return boolean response
|
||||
*/
|
||||
private function changeUniquePostOnTop(bool $isCurrentPostOnTop): bool
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ class ProductsController extends Controller
|
|||
public function create(Product $product)
|
||||
{
|
||||
$gammes = Gamme::all()->sortBy('title');
|
||||
//default structure + produits
|
||||
$tabFour = array(
|
||||
// default structure + produits
|
||||
$tabFour = array(
|
||||
'id' => 0,
|
||||
'name' => 'Four',
|
||||
'url' => '/assets/images/four.png',
|
||||
|
|
@ -42,7 +42,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabFriteuse = array(
|
||||
$tabFriteuse = array(
|
||||
'id' => 1,
|
||||
'name' => 'Friteuse',
|
||||
'url' => '/assets/images/friteuse.png',
|
||||
|
|
@ -50,7 +50,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabPoele = array(
|
||||
$tabPoele = array(
|
||||
'id' => 2,
|
||||
'name' => 'Poêle',
|
||||
'url' => '/assets/images/poele.png',
|
||||
|
|
@ -58,7 +58,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabCocotte = array(
|
||||
$tabCocotte = array(
|
||||
'id' => 3,
|
||||
'name' => 'Cocotte',
|
||||
'url' => '/assets/images/cocotte.png',
|
||||
|
|
@ -66,7 +66,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabPlancha = array(
|
||||
$tabPlancha = array(
|
||||
'id' => 4,
|
||||
'name' => 'Plancha',
|
||||
'url' => '/assets/images/plancha.png',
|
||||
|
|
@ -74,7 +74,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabBainMarie = array(
|
||||
$tabBainMarie = array(
|
||||
'id' => 5,
|
||||
'name' => 'Bain Marie',
|
||||
'url' => '/assets/images/bainmarie.png',
|
||||
|
|
@ -82,7 +82,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabBarbecue = array(
|
||||
$tabBarbecue = array(
|
||||
'id' => 6,
|
||||
'name' => 'Barbecue',
|
||||
'url' => '/assets/images/barbecue.png',
|
||||
|
|
@ -90,7 +90,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabMicroOndes = array(
|
||||
$tabMicroOndes = array(
|
||||
'id' => 7,
|
||||
'name' => 'Micro Ondes',
|
||||
'url' => '/assets/images/microondes.png',
|
||||
|
|
@ -98,7 +98,7 @@ class ProductsController extends Controller
|
|||
'temp' => '',
|
||||
'status' => false
|
||||
);
|
||||
$tabCasserole = array(
|
||||
$tabCasserole = array(
|
||||
'id' => 8,
|
||||
'name' => 'Casserole',
|
||||
'url' => '/assets/images/casserole.png',
|
||||
|
|
@ -122,7 +122,7 @@ class ProductsController extends Controller
|
|||
'url' => '',
|
||||
);
|
||||
//phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
$product->pictos = json_encode([$tabFour, $tabFriteuse, $tabPoele, $tabCocotte, $tabPlancha, $tabBainMarie, $tabBarbecue, $tabMicroOndes, $tabCasserole]);
|
||||
$product->pictos = json_encode([$tabFour, $tabFriteuse, $tabPoele, $tabCocotte, $tabPlancha, $tabBainMarie, $tabBarbecue, $tabMicroOndes, $tabCasserole]);
|
||||
$product->plusproduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]);
|
||||
return view('back.products.create', compact('product', 'gammes'));
|
||||
}
|
||||
|
|
@ -130,19 +130,19 @@ class ProductsController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreProductRequest $request
|
||||
* @param \Illuminate\Http\StoreProductRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StoreProductRequest $request)
|
||||
{
|
||||
$plusproduit = json_decode($request->plusproduit);
|
||||
$product = new Product($request->validated());
|
||||
$product = new Product($request->validated());
|
||||
if (is_a($request->picture, "SplFileInfo")) {
|
||||
$product->picture = Utils::storeImage($request->picture, $product->getTable());
|
||||
}
|
||||
|
||||
foreach ($plusproduit as $plus) {
|
||||
$picto = 'pictogramme' . $plus->id;
|
||||
$picto = 'pictogramme' . $plus->id;
|
||||
$uploadfile = $request->$picto;
|
||||
if ($uploadfile) {
|
||||
$plus->url = Utils::storeImage($uploadfile, $product->getTable());
|
||||
|
|
@ -175,15 +175,15 @@ class ProductsController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Product $product
|
||||
* @param \Illuminate\Http\UpdateProductRequest $request
|
||||
* @param Product $product
|
||||
* @param \Illuminate\Http\UpdateProductRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Product $product, UpdateProductRequest $request)
|
||||
{
|
||||
//valeurs en base pour garder les anciennes images quand elles ne sont pas updatées
|
||||
// valeurs en base pour garder les anciennes images quand elles ne sont pas updatées
|
||||
$dbplusproduit = json_decode($product->plusproduit);
|
||||
//valeurs transmises dans le post
|
||||
// valeurs transmises dans le post
|
||||
$plusproduit = json_decode($request->plusproduit);
|
||||
$product->fill($request->validated());
|
||||
if (is_a($request->picture, "SplFileInfo")) {
|
||||
|
|
@ -191,20 +191,20 @@ class ProductsController extends Controller
|
|||
}
|
||||
|
||||
foreach ($plusproduit as $plus) {
|
||||
//boucle pour stockage des images uploadées
|
||||
$picto = 'pictogramme' . $plus->id;
|
||||
// boucle pour stockage des images uploadées
|
||||
$picto = 'pictogramme' . $plus->id;
|
||||
$uploadfile = $request->$picto;
|
||||
//set de l'url
|
||||
// set de l'url
|
||||
if ($uploadfile) {
|
||||
$plus->url = Utils::storeImage($uploadfile, $product->getTable());
|
||||
} else {
|
||||
if (isset($dbplusproduit[$plus->id])) {
|
||||
//reprise de l'ancienne valeur
|
||||
// reprise de l'ancienne valeur
|
||||
$plus->url = $dbplusproduit[$plus->id]->url;
|
||||
}
|
||||
}
|
||||
}
|
||||
//encodage avant save
|
||||
// encodage avant save
|
||||
$product->plusproduit = json_encode($plusproduit);
|
||||
if (!$product->saveOrFail()) {
|
||||
return redirect()->route('bo.products.edit', $product->id)
|
||||
|
|
@ -218,7 +218,7 @@ class ProductsController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Product $product
|
||||
* @param Product $product
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Product $product)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ class SeoDataController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param UpdateSeoDataRequest $request
|
||||
* @param \App\Models\SeoDatum $SeoDatum
|
||||
* @param UpdateSeoDataRequest $request
|
||||
* @param \App\Models\SeoDatum $SeoDatum
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(UpdateSeoDataRequest $request, SeoDatum $SeoDatum)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class SlidersController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreSliderRequest $request
|
||||
* @param \Illuminate\Http\StoreSliderRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StoreSliderRequest $request)
|
||||
|
|
@ -64,8 +64,8 @@ class SlidersController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\UpdateSliderRequest $request
|
||||
* @param Slider $slider
|
||||
* @param \Illuminate\Http\UpdateSliderRequest $request
|
||||
* @param Slider $slider
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(UpdateSliderRequest $request, Slider $slider)
|
||||
|
|
@ -82,7 +82,7 @@ class SlidersController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Slider $slider
|
||||
* @param Slider $slider
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Slider $slider)
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ class SlidesController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreSlideRequest $request
|
||||
* @param \Illuminate\Http\StoreSlideRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StoreSlideRequest $request)
|
||||
{
|
||||
|
||||
$slide = new Slide($request->validated());
|
||||
$slide = new Slide($request->validated());
|
||||
$slide->order = $this->getLastOrder();
|
||||
if (is_a($request->picture, "SplFileInfo")) {
|
||||
$slide->picture = Utils::storeImage($request->picture, $slide->getTable());
|
||||
|
|
@ -72,8 +72,8 @@ class SlidesController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreSlideRequest $request
|
||||
* @param Slide $slide
|
||||
* @param \Illuminate\Http\StoreSlideRequest $request
|
||||
* @param Slide $slide
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(StoreSlideRequest $request, Slide $slide)
|
||||
|
|
@ -93,7 +93,7 @@ class SlidesController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Slide $slide
|
||||
* @param Slide $slide
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Slide $slide)
|
||||
|
|
@ -108,14 +108,14 @@ class SlidesController extends Controller
|
|||
public function changeOrder(Slide $slide, $action)
|
||||
{
|
||||
if ($action === 'up') {
|
||||
$tmp = Slide::where('order', '<', $slide->order)->orderBy('order', 'DESC')->first();
|
||||
$newOrder = $tmp->order;
|
||||
$tmp->order = $slide->order;
|
||||
$tmp = Slide::where('order', '<', $slide->order)->orderBy('order', 'DESC')->first();
|
||||
$newOrder = $tmp->order;
|
||||
$tmp->order = $slide->order;
|
||||
$slide->order = $newOrder;
|
||||
} else {
|
||||
$tmp = Slide::where('order', '>', $slide->order)->orderBy('order', 'ASC')->first();
|
||||
$newOrder = $tmp->order;
|
||||
$tmp->order = $slide->order;
|
||||
$tmp = Slide::where('order', '>', $slide->order)->orderBy('order', 'ASC')->first();
|
||||
$newOrder = $tmp->order;
|
||||
$tmp->order = $slide->order;
|
||||
$slide->order = $newOrder;
|
||||
}
|
||||
$tmp->save();
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ class TextsController extends Controller
|
|||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreTextRequest $request
|
||||
* @param \Illuminate\Http\StoreTextRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(StoreTextRequest $request)
|
||||
{
|
||||
$text = new Text($request->validated());
|
||||
$text = new Text($request->validated());
|
||||
$text->page = Page::newsQuestions();
|
||||
|
||||
if (!$text->saveOrFail()) {
|
||||
|
|
@ -69,8 +69,8 @@ class TextsController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\StoreTextRequest $request
|
||||
* @param Text $text
|
||||
* @param \Illuminate\Http\StoreTextRequest $request
|
||||
* @param Text $text
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Text $text, StoreTextRequest $request)
|
||||
|
|
@ -89,7 +89,7 @@ class TextsController extends Controller
|
|||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Text $text
|
||||
* @param Text $text
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Text $text)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ class TitlesController extends Controller
|
|||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Title $title
|
||||
* @param \Illuminate\Http\UpdateTitleRequest $request
|
||||
* @param Title $title
|
||||
* @param \Illuminate\Http\UpdateTitleRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Title $title, UpdateTitleRequest $request)
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ class FoodServiceController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$page = Page::foodservice();
|
||||
$page = Page::foodservice();
|
||||
$seoDatum = SeoDatum::where('page', $page)->first();
|
||||
|
||||
$encart_food = Encart::where('page', Page::foodHeader()->value)->first();
|
||||
$encart_food = Encart::where('page', Page::foodHeader()->value)->first();
|
||||
$title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first();
|
||||
$pictos_food = Picto::where('page', Page::foodBloc2()->value)->get();
|
||||
$products_food = Product::where('is_food_service', true)->get();
|
||||
$pictos_food = Picto::where('page', Page::foodBloc2()->value)->get();
|
||||
$products_food = Product::where('is_food_service', true)->get();
|
||||
|
||||
return view('front.food-service', compact(
|
||||
'seoDatum',
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ class GammesController extends Controller
|
|||
public function index()
|
||||
{
|
||||
$gammes = Gamme::whereNull('parent_gamme_id')->orderBy('title')->get();
|
||||
//remove Food Service from count
|
||||
// remove Food Service from count
|
||||
/** @var \Illuminate\Database\Eloquent\Collection $gammes */
|
||||
$gammes = $gammes->whereNotIn('slug', 'food-service');
|
||||
$gammes = $gammes->whereNotIn('slug', 'food-service');
|
||||
$nb_gammes = $gammes->count();
|
||||
|
||||
$page = Page::gammes();
|
||||
$page = Page::gammes();
|
||||
$seoDatum = SeoDatum::where('page', $page)->first();
|
||||
|
||||
return view('front.gammes.index', compact('gammes', 'nb_gammes', 'seoDatum'));
|
||||
|
|
@ -25,7 +25,7 @@ class GammesController extends Controller
|
|||
|
||||
public function show(Gamme $gamme)
|
||||
{
|
||||
$gammes = collect([]);
|
||||
$gammes = collect([]);
|
||||
$dbGammes = Gamme::where('id', $gamme->id)
|
||||
->with('childGammes')->get();
|
||||
|
||||
|
|
@ -43,9 +43,9 @@ class GammesController extends Controller
|
|||
->orderBy('name')
|
||||
->get();
|
||||
|
||||
//make ghost seoDatum from the gamme
|
||||
$seoDatum = new SeoDatum();
|
||||
$seoDatum->title = $gamme->title;
|
||||
// make ghost seoDatum from the gamme
|
||||
$seoDatum = new SeoDatum();
|
||||
$seoDatum->title = $gamme->title;
|
||||
$seoDatum->description = $gamme->text;
|
||||
|
||||
return view('front.gammes.show', compact('gamme', 'products', 'seoDatum'));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class HomeController extends Controller
|
|||
public function index()
|
||||
{
|
||||
|
||||
$page = Page::home();
|
||||
$page = Page::home();
|
||||
$seoDatum = SeoDatum::where('page', $page)->first();
|
||||
|
||||
$slider = Slider::where('published', 1)->first();
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ class LegalsController extends Controller
|
|||
{
|
||||
$mentions_legales = Text::where('page', Page::mentions()->value)->first();
|
||||
|
||||
//make ghost seoDatum from the gamme
|
||||
$seoDatum = new SeoDatum();
|
||||
// make ghost seoDatum from the gamme
|
||||
$seoDatum = new SeoDatum();
|
||||
$seoDatum->title = $mentions_legales->title;
|
||||
|
||||
return view('front.legals', compact('seoDatum', 'mentions_legales'));
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class MarqueController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$page = Page::marque();
|
||||
$page = Page::marque();
|
||||
$seoDatum = SeoDatum::where('page', $page)->first();
|
||||
|
||||
$encart_marqueHeader = Encart::where('page', Page::marqueHeader()->value)->first();
|
||||
|
|
@ -24,9 +24,9 @@ class MarqueController extends Controller
|
|||
|
||||
$pictobrands_marque = PictoBrand::all();
|
||||
$pictos_marqueBloc2 = Picto::where('page', Page::marqueBloc2()->value)->get();
|
||||
$title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first();
|
||||
$title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first();
|
||||
$moments = Moment::where('page', Page::marqueHistory()->value)->get();
|
||||
$title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first();
|
||||
$title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first();
|
||||
$moments = Moment::where('page', Page::marqueHistory()->value)->get();
|
||||
|
||||
return view('front.a-propos', compact(
|
||||
'seoDatum',
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@ class NewsController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$page = Page::news();
|
||||
$page = Page::news();
|
||||
$seoDatum = SeoDatum::where('page', $page)->first();
|
||||
|
||||
$advice_news = Advice::all()->first();
|
||||
$texts_news = Text::where('page', Page::newsQuestions()->value)->get();
|
||||
$advice_news = Advice::all()->first();
|
||||
$texts_news = Text::where('page', Page::newsQuestions()->value)->get();
|
||||
$title_newsPosts = Title::where('page', Page::newsPosts()->value)->first();
|
||||
|
||||
$posts = Post::where([
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ class PolicyController extends Controller
|
|||
{
|
||||
$privacy_policy = Text::where('page', Page::charte()->value)->first();
|
||||
|
||||
//make ghost seoDatum from the gamme
|
||||
$seoDatum = new SeoDatum();
|
||||
// make ghost seoDatum from the gamme
|
||||
$seoDatum = new SeoDatum();
|
||||
$seoDatum->title = $privacy_policy->title;
|
||||
|
||||
return view('front.policy', compact('seoDatum', 'privacy_policy'));
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ class ProductsController extends Controller
|
|||
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed
|
||||
public function show(Gamme $gamme, Product $product)
|
||||
{
|
||||
$seoDatum = new SeoDatum();
|
||||
$seoDatum->title = $product->name;
|
||||
$seoDatum = new SeoDatum();
|
||||
$seoDatum->title = $product->name;
|
||||
$seoDatum->description = $product->description;
|
||||
|
||||
return view('front.product', compact('product', 'gamme', 'seoDatum'));
|
||||
|
|
|
|||
|
|
@ -17,32 +17,32 @@ class BackEndGlobals
|
|||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$encart_home = Encart::where('page', Page::homeHeader()->value)->first();
|
||||
$encart_home = Encart::where('page', Page::homeHeader()->value)->first();
|
||||
$encart_marqueHeader = Encart::where('page', Page::marqueHeader()->value)->first();
|
||||
$encart_marqueBloc4l = Encart::where('page', Page::marqueBloc4l()->value)->first();
|
||||
$encart_marqueBloc4r = Encart::where('page', Page::marqueBloc4r()->value)->first();
|
||||
$encart_marqueFooter = Encart::where('page', Page::marqueFooter()->value)->first();
|
||||
$encart_food = Encart::where('page', Page::foodHeader()->value)->first();
|
||||
$mentions_legales = Text::where('page', Page::mentions()->value)->first();
|
||||
$privacy_policy = Text::where('page', Page::charte()->value)->first();
|
||||
$encart_food = Encart::where('page', Page::foodHeader()->value)->first();
|
||||
$mentions_legales = Text::where('page', Page::mentions()->value)->first();
|
||||
$privacy_policy = Text::where('page', Page::charte()->value)->first();
|
||||
|
||||
$advice_news = Advice::all()->first();
|
||||
|
||||
$pictos_marqueBloc2 = Picto::where('page', Page::marqueBloc2()->value)->get();
|
||||
$pictos_food = Picto::where('page', Page::foodBloc2()->value)->get();
|
||||
$pictos_food = Picto::where('page', Page::foodBloc2()->value)->get();
|
||||
|
||||
$texts_news = Text::where('page', Page::newsQuestions()->value)->get();
|
||||
|
||||
$title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first();
|
||||
$title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first();
|
||||
$title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first();
|
||||
$title_newsPosts = Title::where('page', Page::newsPosts()->value)->first();
|
||||
$title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first();
|
||||
$title_newsPosts = Title::where('page', Page::newsPosts()->value)->first();
|
||||
|
||||
View::share('encart_home', $encart_home);
|
||||
View::share('encart_marqueHeader', $encart_marqueHeader);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,5 @@ class EncryptCookies extends Middleware
|
|||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ class FrontEndGlobals
|
|||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
//header menu
|
||||
$currentRoute = Route::current()->getName();
|
||||
// header menu
|
||||
$currentRoute = Route::current()->getName();
|
||||
$routeParamsFR = Route::current()->parameters();
|
||||
$routeParamsEN = $routeParamsFR;
|
||||
$routeParamsES = $routeParamsFR;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ class LangCheck
|
|||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
|
|
@ -22,28 +22,28 @@ class LangCheck
|
|||
|
||||
$routName = $request->route()->getName();
|
||||
if (preg_match('/^bo\./', $routName)) {
|
||||
//Back office
|
||||
// Back office
|
||||
if ($request->lang) {
|
||||
//within bo we set lang with querystring param
|
||||
// within bo we set lang with querystring param
|
||||
$this->saveUserLocale($request->lang, $request);
|
||||
//bonus remove lang parameter from query
|
||||
// bonus remove lang parameter from query
|
||||
return redirect()->to($request->fullUrlWithoutQuery('lang'));
|
||||
} else {
|
||||
$this->checkFirstAccess($request);
|
||||
}
|
||||
} else {
|
||||
//FRONT
|
||||
// FRONT
|
||||
if (preg_match('/^(en|es)\./', $routName)) {
|
||||
//from front use named routes
|
||||
// from front use named routes
|
||||
$langset = $request->segment(1);
|
||||
|
||||
$this->saveUserLocale($langset, $request);
|
||||
} else {
|
||||
//not specified in route
|
||||
// not specified in route
|
||||
if ($this->checkFirstAccess($request)) {
|
||||
$routNameEN = 'en.' . $routName;
|
||||
$routNameES = 'es.' . $routName;
|
||||
$sess_lang = $request->session()->get('lang', config('app.locale'));
|
||||
$sess_lang = $request->session()->get('lang', config('app.locale'));
|
||||
switch ($sess_lang) {
|
||||
case 'en':
|
||||
return redirect()->route($routNameEN);
|
||||
|
|
@ -54,8 +54,8 @@ class LangCheck
|
|||
|
||||
$langset = 'fr';
|
||||
$this->saveUserLocale($langset, $request);
|
||||
}
|
||||
}
|
||||
}//end if
|
||||
}//end if
|
||||
|
||||
|
||||
|
||||
|
|
@ -77,9 +77,9 @@ class LangCheck
|
|||
*/
|
||||
private function saveUserLocale($lang, Request $request)
|
||||
{
|
||||
//Set cookie
|
||||
// Set cookie
|
||||
Cookie::queue(Cookie::forever('language', strtolower($lang)));
|
||||
//set session
|
||||
// set session
|
||||
$request->session()->put('lang', strtolower($lang));
|
||||
}
|
||||
|
||||
|
|
@ -90,21 +90,21 @@ class LangCheck
|
|||
*/
|
||||
private function checkFirstAccess(Request $request)
|
||||
{
|
||||
//do we have session ?
|
||||
// do we have session ?
|
||||
if (!$request->session()->has('lang')) {
|
||||
$fromC = Cookie::get('language');
|
||||
if (is_null($fromC) || empty($fromC)) {
|
||||
//pas de cookie, recherche sur le navigateur
|
||||
// pas de cookie, recherche sur le navigateur
|
||||
$fromC = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);
|
||||
if (!in_array($fromC, $this->langs)) {
|
||||
//default other languages to en
|
||||
// default other languages to en
|
||||
$fromC = 'en';
|
||||
}
|
||||
}
|
||||
$this->saveUserLocale($fromC, $request);
|
||||
return true;
|
||||
}
|
||||
//we have lang session
|
||||
// we have lang session
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,5 @@ class PreventRequestsDuringMaintenance extends Middleware
|
|||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ class RedirectIfAuthenticated
|
|||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null ...$guards
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null ...$guards
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, ...$guards)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class TrustProxies extends Middleware
|
|||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
* @var integer
|
||||
*/
|
||||
protected $headers =
|
||||
Request::HEADER_X_FORWARDED_FOR |
|
||||
|
|
|
|||
|
|
@ -12,6 +12,5 @@ class VerifyCsrfToken extends Middleware
|
|||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class ContactFormRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class StoreGammeRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class StorePictoBrandRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class StorePictoRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class StorePostRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class StoreProductRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
@ -28,7 +28,7 @@ class StoreProductRequest extends FormRequest
|
|||
protected function prepareForValidation()
|
||||
{
|
||||
try {
|
||||
$tabFour = array(
|
||||
$tabFour = array(
|
||||
'id' => 0,
|
||||
'name' => 'Four',
|
||||
'url' => '/assets/images/four.png',
|
||||
|
|
@ -36,7 +36,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook0,
|
||||
'status' => $this->is_activated0 ? true : false
|
||||
);
|
||||
$tabFriteuse = array(
|
||||
$tabFriteuse = array(
|
||||
'id' => 1,
|
||||
'name' => 'Friteuse',
|
||||
'url' => '/assets/images/friteuse.png',
|
||||
|
|
@ -44,7 +44,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook1,
|
||||
'status' => $this->is_activated1 ? true : false
|
||||
);
|
||||
$tabPoele = array(
|
||||
$tabPoele = array(
|
||||
'id' => 2,
|
||||
'name' => 'Poêle',
|
||||
'url' => '/assets/images/poele.png',
|
||||
|
|
@ -52,7 +52,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook2,
|
||||
'status' => $this->is_activated2 ? true : false
|
||||
);
|
||||
$tabCocotte = array(
|
||||
$tabCocotte = array(
|
||||
'id' => 3,
|
||||
'name' => 'Cocotte',
|
||||
'url' => '/assets/images/cocotte.png',
|
||||
|
|
@ -60,7 +60,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook3,
|
||||
'status' => $this->is_activated3 ? true : false
|
||||
);
|
||||
$tabPlancha = array(
|
||||
$tabPlancha = array(
|
||||
'id' => 4,
|
||||
'name' => 'Plancha',
|
||||
'url' => '/assets/images/plancha.png',
|
||||
|
|
@ -68,7 +68,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook4,
|
||||
'status' => $this->is_activated4 ? true : false
|
||||
);
|
||||
$tabBainMarie = array(
|
||||
$tabBainMarie = array(
|
||||
'id' => 5,
|
||||
'name' => 'Bain Marie',
|
||||
'url' => '/assets/images/bainmarie.png',
|
||||
|
|
@ -76,7 +76,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook5,
|
||||
'status' => $this->is_activated5 ? true : false
|
||||
);
|
||||
$tabBarbecue = array(
|
||||
$tabBarbecue = array(
|
||||
'id' => 6,
|
||||
'name' => 'Barbecue',
|
||||
'url' => '/assets/images/barbecue.png',
|
||||
|
|
@ -92,7 +92,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook7,
|
||||
'status' => $this->is_activated7 ? true : false
|
||||
);
|
||||
$tabCasserole = array(
|
||||
$tabCasserole = array(
|
||||
'id' => 8,
|
||||
'name' => 'Casserole',
|
||||
'url' => '/assets/images/casserole.png',
|
||||
|
|
@ -100,7 +100,7 @@ class StoreProductRequest extends FormRequest
|
|||
'temp' => $this->temp_cook8,
|
||||
'status' => $this->is_activated8 ? true : false
|
||||
);
|
||||
$tabCuisson = json_encode([
|
||||
$tabCuisson = json_encode([
|
||||
'four' => $tabFour,
|
||||
'friteuse' => $tabFriteuse,
|
||||
'poele' => $tabPoele,
|
||||
|
|
@ -121,7 +121,7 @@ class StoreProductRequest extends FormRequest
|
|||
'name' => $this->content0,
|
||||
'url' => $urlPlusProduit,
|
||||
);
|
||||
$urlPlusProduit = "";
|
||||
$urlPlusProduit = "";
|
||||
if ($this->pictogramme1) {
|
||||
$urlPlusProduit = "/assets/images/" . $this->pictogramme1->getClientOriginalName();
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ class StoreProductRequest extends FormRequest
|
|||
'name' => $this->content1,
|
||||
'url' => $urlPlusProduit,
|
||||
);
|
||||
$urlPlusProduit = "";
|
||||
$urlPlusProduit = "";
|
||||
if ($this->pictogramme2) {
|
||||
$urlPlusProduit = "/assets/images/" . $this->pictogramme2->getClientOriginalName();
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ class StoreProductRequest extends FormRequest
|
|||
'name' => $this->content2,
|
||||
'url' => $urlPlusProduit,
|
||||
);
|
||||
$tabPlusProduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]);
|
||||
$tabPlusProduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]);
|
||||
|
||||
$this->merge([
|
||||
'slug' => Str::slug($this->name),
|
||||
|
|
@ -158,7 +158,7 @@ class StoreProductRequest extends FormRequest
|
|||
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
|
||||
} catch (InvalidFormatException $e) {
|
||||
// On fait rien
|
||||
}
|
||||
}//end try
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class StoreSlideRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class StoreSliderRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class StoreTextRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdateAdviceRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdateEncartRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdateMomentRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdatePictoBrandRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdatePictoRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdateSeoDataRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class UpdateTitleRequest extends FormRequest
|
|||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@ class Utils
|
|||
* if a string is passed then the store action is ignored and the strieng is returned
|
||||
*
|
||||
* @param \Illuminate\Http\UploadedFile|\SplFileInfo|string $image
|
||||
* @param string $folderName
|
||||
* @param string $folderName
|
||||
* @return string The storage path
|
||||
*/
|
||||
public static function storeImage($image, string $folderName): string
|
||||
{
|
||||
if (\is_object($image) and get_class($image) === UploadedFile::class) {
|
||||
/** @var UploadedFile */
|
||||
$image = $image;
|
||||
$image = $image;
|
||||
$newPath = self::prepareMoveFile($image->getClientOriginalName(), $folderName);
|
||||
$newPath = str_replace(storage_path('app'), '', $newPath);
|
||||
$image->storePubliclyAs(pathinfo($newPath, \PATHINFO_DIRNAME), pathinfo($newPath, \PATHINFO_BASENAME));
|
||||
|
|
@ -36,7 +36,7 @@ class Utils
|
|||
}
|
||||
if (\is_object($image) and get_class($image) === SplFileInfo::class) {
|
||||
/** @var SplFileInfo */
|
||||
$image = $image;
|
||||
$image = $image;
|
||||
$newPath = self::prepareMoveFile($image->getBaseName(), $folderName);
|
||||
if (!File::copy($image->getRealPath(), $newPath)) {
|
||||
throw new \Exception(sprintf(
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class Product extends Model
|
|||
}
|
||||
}
|
||||
}
|
||||
//delete des images de plus produit
|
||||
// delete des images de plus produit
|
||||
$plusproduit = json_decode($product->plusproduit);
|
||||
foreach ($plusproduit as $plus) {
|
||||
$urlPicture = public_path() . $plus->url;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ class AppServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,7 +21,5 @@ class AuthServiceProvider extends ServiceProvider
|
|||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
|
|
@ -26,6 +26,5 @@ class EventServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@ namespace App\Providers;
|
|||
|
||||
use App\Models\Gamme;
|
||||
use App\Models\Product;
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
|
|
@ -28,14 +25,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
|
||||
$this->routes(function () {
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
|
|
@ -48,23 +38,11 @@ class RouteServiceProvider extends ServiceProvider
|
|||
});
|
||||
|
||||
Route::bind('productSlug', function ($value, $route) {
|
||||
$gamme = $route->parameter('gammeSlug');
|
||||
$gamme = $route->parameter('gammeSlug');
|
||||
$product = Product::where('slug', 'LIKE', '%:"' . $value . '"%')
|
||||
->where('gamme_id', $gamme->id)
|
||||
->firstOrFail();
|
||||
return $product;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the rate limiters for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ trait CastsEnumsHasTranslations
|
|||
public function getAttributeValue($key)
|
||||
{
|
||||
if ($this->hasEnumCast($key)) {
|
||||
return $this->enumGetAttributeValue($key);
|
||||
return $this->enumGetAttributeValue($key);
|
||||
}
|
||||
|
||||
return $this->transGetAttributeValue($key);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"kwaadpepper/enum": "^2.1",
|
||||
"kwaadpepper/exception-handler": "^0.0.9",
|
||||
"laravel/framework": "^8.65",
|
||||
"laravel/sanctum": "^2.11",
|
||||
"laravel/tinker": "^2.5",
|
||||
"laravel/ui": "^3.3",
|
||||
"ldc/web-admin-secure-laravel": "1.0.1",
|
||||
|
|
|
|||
66
composer.lock
generated
66
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "fcf9b3346e30223089c406870c83a34d",
|
||||
"content-hash": "b27ccff2f463281dca6230c1d20be58e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
|
@ -1280,70 +1280,6 @@
|
|||
},
|
||||
"time": "2022-03-08T16:12:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sanctum",
|
||||
"version": "v2.14.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sanctum.git",
|
||||
"reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/dc5d749ba9bfcfd68d8f5c272238f88bea223e66",
|
||||
"reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"illuminate/contracts": "^6.9|^7.0|^8.0|^9.0",
|
||||
"illuminate/database": "^6.9|^7.0|^8.0|^9.0",
|
||||
"illuminate/support": "^6.9|^7.0|^8.0|^9.0",
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
|
||||
"phpunit/phpunit": "^8.0|^9.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laravel\\Sanctum\\SanctumServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\Sanctum\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.",
|
||||
"keywords": [
|
||||
"auth",
|
||||
"laravel",
|
||||
"sanctum"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/sanctum/issues",
|
||||
"source": "https://github.com/laravel/sanctum"
|
||||
},
|
||||
"time": "2022-02-16T14:40:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
"version": "v1.1.1",
|
||||
|
|
|
|||
176
config/app.php
176
config/app.php
|
|
@ -3,53 +3,53 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application. This value is used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application. This value is used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services the application utilizes. Set this in your ".env" file.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services the application utilizes. Set this in your ".env" file.
|
||||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => (bool)env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
|
@ -57,66 +57,66 @@ return [
|
|||
'asset_url' => env('ASSET_URL', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. We have gone
|
||||
| ahead and set this to a sensible default for you out of the box.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. We have gone
|
||||
| ahead and set this to a sensible default for you out of the box.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'Europe/Paris',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'fr',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The fallback locale determines the locale to use when the current one
|
||||
| is not available. You may change the value to correspond to any of
|
||||
| the language folders that are provided through your application.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The fallback locale determines the locale to use when the current one
|
||||
| is not available. You may change the value to correspond to any of
|
||||
| the language folders that are provided through your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback_locale' => 'fr',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Faker Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This locale will be used by the Faker PHP library when generating fake
|
||||
| data for your database seeds. For example, this will be used to get
|
||||
| localized telephone numbers, street address information and more.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Faker Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This locale will be used by the Faker PHP library when generating fake
|
||||
| data for your database seeds. For example, this will be used to get
|
||||
| localized telephone numbers, street address information and more.
|
||||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'fr_FR',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
|
|
@ -124,14 +124,14 @@ return [
|
|||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
|
@ -177,14 +177,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'aliases' => [
|
||||
|
|
|
|||
112
config/auth.php
112
config/auth.php
|
|
@ -3,14 +3,14 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default authentication "guard" and password
|
||||
| reset options for your application. You may change these defaults
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default authentication "guard" and password
|
||||
| reset options for your application. You may change these defaults
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
|
|
@ -19,20 +19,20 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| here which uses session storage and the Eloquent user provider.
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| Supported: "session"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| here which uses session storage and the Eloquent user provider.
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| Supported: "session"
|
||||
|
|
||||
*/
|
||||
|
||||
'guards' => [
|
||||
|
|
@ -43,20 +43,20 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| If you have multiple user tables or models you may configure multiple
|
||||
| sources which represent each model / table. These sources may then
|
||||
| be assigned to any extra authentication guards you have defined.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| If you have multiple user tables or models you may configure multiple
|
||||
| sources which represent each model / table. These sources may then
|
||||
| be assigned to any extra authentication guards you have defined.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
|
@ -67,18 +67,18 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expire time is the number of minutes that the reset token should be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expire time is the number of minutes that the reset token should be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'passwords' => [
|
||||
|
|
@ -91,14 +91,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define the amount of seconds before a password confirmation
|
||||
| times out and the user is prompted to re-enter their password via the
|
||||
| confirmation screen. By default, the timeout lasts for three hours.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define the amount of seconds before a password confirmation
|
||||
| times out and the user is prompted to re-enter their password via the
|
||||
| confirmation screen. By default, the timeout lasts for three hours.
|
||||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => 10800,
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| App parameters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Several parameters
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| App parameters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Several parameters
|
||||
|
|
||||
*/
|
||||
|
||||
'slide_image_maxwidth' => '1920',
|
||||
|
|
|
|||
|
|
@ -3,29 +3,29 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default broadcaster that will be used by the
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
| Supported: "pusher", "ably", "redis", "log", "null"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default broadcaster that will be used by the
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
| Supported: "pusher", "ably", "redis", "log", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the broadcast connections that will be used
|
||||
| to broadcast events to other systems or over websockets. Samples of
|
||||
| each available type of connection are provided inside this array.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the broadcast connections that will be used
|
||||
| to broadcast events to other systems or over websockets. Samples of
|
||||
| each available type of connection are provided inside this array.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
|
|
|||
|
|
@ -5,30 +5,30 @@ use Illuminate\Support\Str;
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
|
@ -95,14 +95,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||
| be other applications utilizing the same cache. So, we'll specify a
|
||||
| value to get prefixed to all our keys so we can avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your settings for cross-origin resource sharing
|
||||
| or "CORS". This determines what cross-origin operations may execute
|
||||
| in web browsers. You are free to adjust these settings as needed.
|
||||
|
|
||||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your settings for cross-origin resource sharing
|
||||
| or "CORS". This determines what cross-origin operations may execute
|
||||
| in web browsers. You are free to adjust these settings as needed.
|
||||
|
|
||||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
||||
|
|
|
|||
|
|
@ -5,32 +5,32 @@ use Illuminate\Support\Str;
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
|
@ -94,27 +94,27 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer body of commands than a typical key-value system
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer body of commands than a typical key-value system
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
|
|
|
|||
|
|
@ -3,29 +3,29 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. The "local" disk, as well as a variety of cloud
|
||||
| based disks are available to your application. Just store away!
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. The "local" disk, as well as a variety of cloud
|
||||
| based disks are available to your application. Just store away!
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been setup for each driver as an example of the required options.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
|
|
@ -56,14 +56,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Symbolic Links
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the symbolic links that will be created when the
|
||||
| `storage:link` Artisan command is executed. The array keys should be
|
||||
| the locations of the links and the values should be their targets.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Symbolic Links
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the symbolic links that will be created when the
|
||||
| `storage:link` Artisan command is executed. The array keys should be
|
||||
| the locations of the links and the values should be their targets.
|
||||
|
|
||||
*/
|
||||
|
||||
'links' => [
|
||||
|
|
|
|||
|
|
@ -3,29 +3,29 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon", "argon2id"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon", "argon2id"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
|
|
@ -33,14 +33,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
|
|
|
|||
|
|
@ -7,44 +7,44 @@ use Monolog\Handler\SyslogUdpHandler;
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
*/
|
||||
|
||||
'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
|
|
|
|||
|
|
@ -3,34 +3,34 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||
| sending an e-mail. You will specify which one you are using for your
|
||||
| mailers below. You are free to add additional mailers as required.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||
| "postmark", "log", "array", "failover"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||
| sending an e-mail. You will specify which one you are using for your
|
||||
| mailers below. You are free to add additional mailers as required.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||
| "postmark", "log", "array", "failover"
|
||||
|
|
||||
*/
|
||||
|
||||
'mailers' => [
|
||||
|
|
@ -81,14 +81,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => [
|
||||
|
|
@ -102,14 +102,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using Markdown based email rendering, you may configure your
|
||||
| theme and component paths here, allowing you to customize the design
|
||||
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using Markdown based email rendering, you may configure your
|
||||
| theme and component paths here, allowing you to customize the design
|
||||
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||
|
|
||||
*/
|
||||
|
||||
'markdown' => [
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ return [
|
|||
'cacheFileMode' => 0755,
|
||||
'settings' => [
|
||||
'default' => [
|
||||
'HTML.SafeIframe' => true, // For iframes
|
||||
'HTML.SafeIframe' => true,
|
||||
// For iframes
|
||||
'URI.SafeIframeRegexp' => "%^(http://|https://|//)(vimeo.com)%",
|
||||
'HTML.Doctype' => 'HTML 4.01 Transitional',
|
||||
'HTML.Allowed' => 'h1[style],h2[style],h3[style],h4[style],h5[style],h6[style],figure[class],oembed[url],div,b,strong,i,em,u,a[href|title],ul[style],ol[style],dl[style],li,p[style],br,span[style|class],img[width|height|alt|src],iframe[src|width|height|class|frameborder],table,thead,tbody,th,tr,td,hr',
|
||||
|
|
|
|||
|
|
@ -3,29 +3,29 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue API supports an assortment of back-ends via a single
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for every one. Here you may define a default connection.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue API supports an assortment of back-ends via a single
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for every one. Here you may define a default connection.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection information for each server that
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection information for each server that
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
|
@ -74,14 +74,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control which database and table are used to store the jobs that
|
||||
| have failed. You may change them to any database / table you wish.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control which database and table are used to store the jobs that
|
||||
| have failed. You may change them to any database / table you wish.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stateful Domains
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Requests from the following domains / hosts will receive stateful API
|
||||
| authentication cookies. Typically, these should include your local
|
||||
| and production domains which access your API via a frontend SPA.
|
||||
|
|
||||
*/
|
||||
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
|
||||
'%s%s',
|
||||
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
|
||||
env('APP_URL') ? ',' . parse_url(env('APP_URL'), PHP_URL_HOST) : ''
|
||||
))),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Expiration Minutes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value controls the number of minutes until an issued token will be
|
||||
| considered expired. If this value is null, personal access tokens do
|
||||
| not expire. This won't tweak the lifetime of first-party sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'expiration' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sanctum Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When authenticating your first-party SPA with Sanctum you may need to
|
||||
| customize some of the middleware Sanctum uses while processing the
|
||||
| request. You may change the middleware listed below as required.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
|
||||
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -3,15 +3,15 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||
| location for this type of information, allowing packages to have
|
||||
| a conventional file to locate the various service credentials.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||
| location for this type of information, allowing packages to have
|
||||
| a conventional file to locate the various service credentials.
|
||||
|
|
||||
*/
|
||||
|
||||
'mailgun' => [
|
||||
|
|
|
|||
|
|
@ -5,30 +5,30 @@ use Illuminate\Support\Str;
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "dynamodb", "array"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "dynamodb", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||
|
|
@ -36,94 +36,94 @@ return [
|
|||
'expire_on_close' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path('framework/sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| While using one of the framework's cache driven session backends you may
|
||||
| list a cache store that should be used for these sessions. This value
|
||||
| must match with one of the application's configured cache "stores".
|
||||
|
|
||||
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| While using one of the framework's cache driven session backends you may
|
||||
| list a cache store that should be used for these sessions. This value
|
||||
| must match with one of the application's configured cache "stores".
|
||||
|
|
||||
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => env(
|
||||
|
|
@ -132,68 +132,68 @@ return [
|
|||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTPS Only Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By setting this option to true, session cookies will only be sent back
|
||||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you when it can't be done securely.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTPS Only Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By setting this option to true, session cookies will only be sent back
|
||||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you when it can't be done securely.
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Same-Site Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| will set this value to "lax" since this is a secure default value.
|
||||
|
|
||||
| Supported: "lax", "strict", "none", null
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Same-Site Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| will set this value to "lax" since this is a secure default value.
|
||||
|
|
||||
| Supported: "lax", "strict", "none", null
|
||||
|
|
||||
*/
|
||||
|
||||
'same_site' => 'lax',
|
||||
|
|
|
|||
|
|
@ -2,25 +2,25 @@
|
|||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Package driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The package supports different drivers for translation management.
|
||||
|
|
||||
| Supported: "file", "database"
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Package driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The package supports different drivers for translation management.
|
||||
|
|
||||
| Supported: "file", "database"
|
||||
|
|
||||
*/
|
||||
'driver' => 'database',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Route group configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The package ships with routes to handle language management. Update the
|
||||
| configuration here to configure the routes with your preferred group options.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Route group configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The package ships with routes to handle language management. Update the
|
||||
| configuration here to configure the routes with your preferred group options.
|
||||
|
|
||||
*/
|
||||
'route_group_config' => [
|
||||
'middleware' => [
|
||||
|
|
@ -30,24 +30,24 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Translation methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Update this array to tell the package which methods it should look for
|
||||
| when finding missing translations.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Translation methods
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Update this array to tell the package which methods it should look for
|
||||
| when finding missing translations.
|
||||
|
|
||||
*/
|
||||
'translation_methods' => ['trans', '__'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Scan paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Update this array to tell the package which directories to scan when
|
||||
| looking for missing translations.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Scan paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Update this array to tell the package which directories to scan when
|
||||
| looking for missing translations.
|
||||
|
|
||||
*/
|
||||
'scan_paths' => [
|
||||
resource_path() . '/views/front',
|
||||
|
|
@ -55,22 +55,22 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| UI URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define the URL used to access the language management too.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| UI URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define the URL used to access the language management too.
|
||||
|
|
||||
*/
|
||||
'ui_url' => 'bo/languages',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define the settings for the database driver here.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Database settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define the settings for the database driver here.
|
||||
|
|
||||
*/
|
||||
'database' => [
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most templating systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most templating systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
|
|
@ -18,14 +18,14 @@ return [
|
|||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
|
||||
'compiled' => env(
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class AdviceFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/repas.jpg'));
|
||||
$advice = new Advice();
|
||||
$upload = new SplFileInfo(resource_path('assets/images/repas.jpg'));
|
||||
$advice = new Advice();
|
||||
$imgpath = Utils::storeImage($upload, $advice->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class EncartFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/prez-img.jpg'));
|
||||
$encart = new Encart();
|
||||
$upload = new SplFileInfo(resource_path('assets/images/prez-img.jpg'));
|
||||
$encart = new Encart();
|
||||
$imgpath = Utils::storeImage($upload, $encart->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ class GammeFactory extends Factory
|
|||
{
|
||||
$title = $this->faker->text(10) . rand(1, 100);
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/cookrange.jpg'));
|
||||
$picture = new Gamme();
|
||||
$imgpath = Utils::storeImage($upload, $picture->getTable());
|
||||
$upload = new SplFileInfo(resource_path('assets/images/entete_sous_gammes.jpg'));
|
||||
$upload = new SplFileInfo(resource_path('assets/images/cookrange.jpg'));
|
||||
$picture = new Gamme();
|
||||
$imgpath = Utils::storeImage($upload, $picture->getTable());
|
||||
$upload = new SplFileInfo(resource_path('assets/images/entete_sous_gammes.jpg'));
|
||||
$bannerpath = Utils::storeImage($upload, $picture->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class PictoBrandFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/site-production.jpg'));
|
||||
$encart = new PictoBrand();
|
||||
$upload = new SplFileInfo(resource_path('assets/images/site-production.jpg'));
|
||||
$encart = new PictoBrand();
|
||||
$imgpath = Utils::storeImage($upload, $encart->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ class PictoFactory extends Factory
|
|||
*/
|
||||
public function definition()
|
||||
{
|
||||
$upload = new SplFileInfo(resource_path('assets/images/qualite.png'));
|
||||
$picto = new Picto();
|
||||
$upload = new SplFileInfo(resource_path('assets/images/qualite.png'));
|
||||
$picto = new Picto();
|
||||
$imgpath = Utils::storeImage($upload, $picto->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ class PostFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/burger-fond.jpg'));
|
||||
$picture = new Post();
|
||||
$upload = new SplFileInfo(resource_path('assets/images/burger-fond.jpg'));
|
||||
$picture = new Post();
|
||||
$imghomepath = Utils::storeImage($upload, $picture->getTable());
|
||||
$upload = new SplFileInfo(resource_path('assets/images/burger.jpg'));
|
||||
$upload = new SplFileInfo(resource_path('assets/images/burger.jpg'));
|
||||
$imgnewspath = Utils::storeImage($upload, $picture->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ class ProductFactory extends Factory
|
|||
*/
|
||||
public function definition()
|
||||
{
|
||||
$name = $this->faker->text(10) . rand(1, 100);
|
||||
$tabFour = array(
|
||||
$name = $this->faker->text(10) . rand(1, 100);
|
||||
$tabFour = array(
|
||||
'id' => 0,
|
||||
'name' => 'Four',
|
||||
'url' => '/assets/images/four.png',
|
||||
|
|
@ -26,7 +26,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '200°C',
|
||||
'status' => true
|
||||
);
|
||||
$tabFriteuse = array(
|
||||
$tabFriteuse = array(
|
||||
'id' => 1,
|
||||
'name' => 'Friteuse',
|
||||
'url' => '/assets/images/friteuse.png',
|
||||
|
|
@ -34,7 +34,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '100°C',
|
||||
'status' => true
|
||||
);
|
||||
$tabPoele = array(
|
||||
$tabPoele = array(
|
||||
'id' => 2,
|
||||
'name' => 'Poêle',
|
||||
'url' => '/assets/images/poele.png',
|
||||
|
|
@ -42,7 +42,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '100°C',
|
||||
'status' => false
|
||||
);
|
||||
$tabCocotte = array(
|
||||
$tabCocotte = array(
|
||||
'id' => 3,
|
||||
'name' => 'Cocotte',
|
||||
'url' => '/assets/images/cocotte.png',
|
||||
|
|
@ -50,7 +50,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '80°C',
|
||||
'status' => true
|
||||
);
|
||||
$tabPlancha = array(
|
||||
$tabPlancha = array(
|
||||
'id' => 4,
|
||||
'name' => 'Plancha',
|
||||
'url' => '/assets/images/plancha.png',
|
||||
|
|
@ -58,7 +58,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '130°C',
|
||||
'status' => false
|
||||
);
|
||||
$tabBainMarie = array(
|
||||
$tabBainMarie = array(
|
||||
'id' => 5,
|
||||
'name' => 'Bain Marie',
|
||||
'url' => '/assets/images/bainmarie.png',
|
||||
|
|
@ -66,7 +66,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '80°C',
|
||||
'status' => false
|
||||
);
|
||||
$tabBarbecue = array(
|
||||
$tabBarbecue = array(
|
||||
'id' => 6,
|
||||
'name' => 'Barbecue',
|
||||
'url' => '/assets/images/barbecue.png',
|
||||
|
|
@ -74,7 +74,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '200°C',
|
||||
'status' => false
|
||||
);
|
||||
$tabMicroOndes = array(
|
||||
$tabMicroOndes = array(
|
||||
'id' => 7,
|
||||
'name' => 'Micro Ondes',
|
||||
'url' => '/assets/images/microondes.png',
|
||||
|
|
@ -82,7 +82,7 @@ class ProductFactory extends Factory
|
|||
'temp' => '900 Watts',
|
||||
'status' => false
|
||||
);
|
||||
$tabCasserole = array(
|
||||
$tabCasserole = array(
|
||||
'id' => 8,
|
||||
'name' => 'Casserole',
|
||||
'url' => '/assets/images/casserole.png',
|
||||
|
|
@ -106,7 +106,7 @@ class ProductFactory extends Factory
|
|||
'url' => '/assets/images/sans-label.jpg',
|
||||
);
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/product_sample_01.png'));
|
||||
$upload = new SplFileInfo(resource_path('assets/images/product_sample_01.png'));
|
||||
$picture = new Product();
|
||||
$imgpath = Utils::storeImage($upload, $picture->getTable());
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ class SlideFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
|
||||
$upload = new SplFileInfo(resource_path('assets/images/image-sample.jpg'));
|
||||
$slide = new Slide();
|
||||
$upload = new SplFileInfo(resource_path('assets/images/image-sample.jpg'));
|
||||
$slide = new Slide();
|
||||
$imgpath = Utils::storeImage($upload, $slide->getTable());
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ class UserFactory extends Factory
|
|||
'name' => $this->faker->name(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',
|
||||
// password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePersonalAccessTokensTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
}
|
||||
160
phpcs.xml
160
phpcs.xml
|
|
@ -1,94 +1,128 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="RealWorld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
|
||||
<ruleset name="LDC Laravel"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
|
||||
<description>Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/</description>
|
||||
<arg name="colors" />
|
||||
<arg name="extensions" value="php" />
|
||||
<file>app/</file>
|
||||
<file>config/</file>
|
||||
<file>database/factories</file>
|
||||
<file>database/seeders</file>
|
||||
<file>routes/</file>
|
||||
<rule ref="PSR1" />
|
||||
<rule ref="PSR12" />
|
||||
|
||||
<rule ref="Generic.Classes.DuplicateClassName"/>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
|
||||
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
||||
<rule ref="Generic.Commenting.Todo"/>
|
||||
<rule ref="Generic.Commenting.Fixme"/>
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
||||
<rule ref="Generic.Files.ByteOrderMark"/>
|
||||
<rule ref="Generic.Files.LineEndings"/>
|
||||
<rule ref="Generic.Files.LineLength"/>
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
||||
<rule ref="Generic.Formatting.MultipleStatementAlignment"/>
|
||||
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
|
||||
<rule ref="Generic.Functions.CallTimePassByReference"/>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity"/>
|
||||
<rule ref="Generic.Metrics.NestingLevel"/>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
||||
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions"/>
|
||||
<rule ref="Generic.PHP.NoSilencedErrors"/>
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
|
||||
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
|
||||
<rule ref="MySource.PHP.EvalObjectFactory"/>
|
||||
<rule ref="MySource.PHP.GetRequestData"/>
|
||||
<rule ref="MySource.PHP.AjaxNullComparison"/>
|
||||
<rule ref="PEAR.Classes.ClassDeclaration"/>
|
||||
<rule ref="PEAR.Commenting.InlineComment"/>
|
||||
<rule ref="PSR1.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR1.Files.SideEffects"/>
|
||||
<rule ref="PSR2.Classes.ClassDeclaration"/>
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
|
||||
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
|
||||
<rule ref="PSR2.Files.EndFileNewline"/>
|
||||
<rule ref="PSR2.Methods.MethodDeclaration"/>
|
||||
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
|
||||
<rule ref="PSR2.Namespaces.UseDeclaration"/>
|
||||
<rule ref="Squiz.PHP.CommentedOutCode"/>
|
||||
<rule ref="Squiz.PHP.DisallowMultipleAssignments">
|
||||
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure" />
|
||||
</rule>
|
||||
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
|
||||
|
||||
<description>Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/
|
||||
</description>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall" />
|
||||
<rule ref="Generic.CodeAnalysis.JumbledIncrementer" />
|
||||
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement" />
|
||||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier" />
|
||||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter" />
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
|
||||
<rule ref="Generic.Commenting.Todo" />
|
||||
<rule ref="Generic.Commenting.Fixme" />
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure" />
|
||||
<rule ref="Generic.Files.ByteOrderMark" />
|
||||
<rule ref="Generic.Files.LineEndings" />
|
||||
<rule ref="Generic.Files.LineLength" />
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
|
||||
<rule ref="Generic.Formatting.NoSpaceAfterCast" />
|
||||
<rule ref="Generic.Functions.CallTimePassByReference" />
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity" />
|
||||
<rule ref="Generic.Metrics.NestingLevel" />
|
||||
<rule ref="Generic.NamingConventions.ConstructorName" />
|
||||
<rule ref="Generic.NamingConventions.UpperCaseConstantName" />
|
||||
<rule ref="Generic.NamingConventions.CamelCapsFunctionName" />
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions" />
|
||||
<rule ref="Generic.PHP.DisallowShortOpenTag" />
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions" />
|
||||
<rule ref="Generic.PHP.LowerCaseConstant" />
|
||||
<rule ref="Generic.PHP.NoSilencedErrors" />
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat" />
|
||||
<rule ref="Generic.WhiteSpace.DisallowTabIndent" />
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent" />
|
||||
<rule ref="MySource.PHP.EvalObjectFactory" />
|
||||
<rule ref="MySource.PHP.GetRequestData" />
|
||||
<rule ref="MySource.PHP.AjaxNullComparison" />
|
||||
<rule ref="PEAR.Classes.ClassDeclaration" />
|
||||
<rule ref="PEAR.Commenting.InlineComment" />
|
||||
<rule ref="PSR1.Classes.ClassDeclaration" />
|
||||
<rule ref="PSR1.Files.SideEffects" />
|
||||
<rule ref="Squiz.PHP.CommentedOutCode" />
|
||||
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops" />
|
||||
<rule ref="Squiz.PHP.DiscouragedFunctions">
|
||||
<properties>
|
||||
<property name="error" value="true" />
|
||||
<property name="error" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.PHP.Eval" />
|
||||
<rule ref="Squiz.PHP.GlobalKeyword" />
|
||||
<rule ref="Squiz.PHP.Heredoc" />
|
||||
<rule ref="Squiz.PHP.InnerFunctions" />
|
||||
<rule ref="Squiz.PHP.LowercasePHPFunctions" />
|
||||
<rule ref="Squiz.PHP.NonExecutableCode" />
|
||||
<rule ref="Squiz.Scope.MemberVarScope" />
|
||||
<rule ref="Squiz.Scope.MethodScope" />
|
||||
<rule ref="Squiz.Scope.StaticThisUsage" />
|
||||
<rule ref="Squiz.PHP.Eval"/>
|
||||
<rule ref="Squiz.PHP.GlobalKeyword"/>
|
||||
<rule ref="Squiz.PHP.Heredoc"/>
|
||||
<rule ref="Squiz.PHP.InnerFunctions"/>
|
||||
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
|
||||
<rule ref="Squiz.PHP.NonExecutableCode"/>
|
||||
<rule ref="Squiz.Scope.MemberVarScope"/>
|
||||
<rule ref="Squiz.Scope.MethodScope"/>
|
||||
<rule ref="Squiz.Scope.StaticThisUsage"/>
|
||||
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.MemberVarSpacing">
|
||||
<properties>
|
||||
<property name="spacingBeforeFirst " value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
|
||||
<properties>
|
||||
<property name="ignoreNewlines" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
|
||||
<properties>
|
||||
<property name="ignoreNewlines" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing" />
|
||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing" />
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses" />
|
||||
|
||||
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
|
||||
<properties>
|
||||
<property name="ignoreNewlines" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
||||
<rule ref="Squiz.Commenting.BlockComment">
|
||||
<exclude name="Squiz.Commenting.BlockComment.WrongStart" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.ClassComment">
|
||||
<exclude name="Squiz.Commenting.ClassComment.Missing" />
|
||||
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
|
||||
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
|
||||
<rule ref="Squiz.Commenting.FunctionComment">
|
||||
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.FunctionCommentThrowTag"/>
|
||||
<rule ref="Squiz.Commenting.InlineComment">
|
||||
<exclude name="Squiz.Commenting.InlineComment.DocBlock" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.LongConditionClosingComment">
|
||||
<exclude name="Squiz.Commenting.LongConditionClosingComment.SpacingBefore" />
|
||||
</rule>
|
||||
<rule ref="Squiz.Commenting.PostStatementComment"/>
|
||||
<rule ref="Squiz.Commenting.VariableComment"/>
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse" />
|
||||
|
||||
<!-- For Laravel migrations -->
|
||||
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
|
||||
<exclude-pattern>*/database/migrations/*</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
||||
|
|
|
|||
31
phpunit.xml
31
phpunit.xml
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests/Unit</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Feature">
|
||||
<directory suffix="Test.php">./tests/Feature</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">./app</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<php>
|
||||
<server name="APP_ENV" value="testing"/>
|
||||
<server name="BCRYPT_ROUNDS" value="4"/>
|
||||
<server name="CACHE_DRIVER" value="array"/>
|
||||
<!-- <server name="DB_CONNECTION" value="sqlite"/> -->
|
||||
<!-- <server name="DB_DATABASE" value=":memory:"/> -->
|
||||
<server name="MAIL_MAILER" value="array"/>
|
||||
<server name="QUEUE_CONNECTION" value="sync"/>
|
||||
<server name="SESSION_DRIVER" value="array"/>
|
||||
<server name="TELESCOPE_ENABLED" value="false"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may register all of the event broadcasting channels that your
|
||||
| application supports. The given channel authorization callbacks are
|
||||
| used to check if an authenticated user can listen to the channel.
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
return (int)$user->id === (int)$id;
|
||||
});
|
||||
|
|
@ -4,14 +4,14 @@ use Illuminate\Foundation\Inspiring;
|
|||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
|
|
|
|||
|
|
@ -40,14 +40,14 @@ use Illuminate\Support\Facades\Lang;
|
|||
use Illuminate\Support\Str;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::prefix('bo')
|
||||
|
|
@ -60,9 +60,12 @@ Route::prefix('bo')
|
|||
'login' => true,
|
||||
'logout' => true,
|
||||
'register' => false,
|
||||
'reset' => false, // for resetting passwords
|
||||
'confirm' => false, // for additional password confirmations
|
||||
'verify' => false, // for email verification
|
||||
'reset' => false,
|
||||
// for resetting passwords
|
||||
'confirm' => false,
|
||||
// for additional password confirmations
|
||||
'verify' => false,
|
||||
// for email verification
|
||||
]
|
||||
);
|
||||
Route::middleware(['auth:web', 'back-end-globals', 'lang-check'])
|
||||
|
|
@ -133,10 +136,10 @@ foreach ($langs as $lang) {
|
|||
Route::get('/' . Str::slug(Lang::get('urls.legals', [], $lang)), [ControllersLegalsController::class, 'index'])->name('cgu');
|
||||
Route::get('/' . Str::slug(Lang::get('urls.policy', [], $lang)), [ControllersPolicyController::class, 'index'])->name('policy');
|
||||
Route::get('/' . Str::slug(Lang::get('urls.search', [], $lang)), [ControllersProductsController::class, 'search'])->name('search');
|
||||
//Classic
|
||||
// Classic
|
||||
Route::get('/' . Str::slug(Lang::get('urls.contact', [], $lang)), [ControllersContactController::class, 'contact'])->name('contact');
|
||||
Route::post('/contact', [ControllersContactController::class, 'contactSubmit'])->name('contact.submit');
|
||||
// phpcs:enable
|
||||
}
|
||||
);
|
||||
}
|
||||
}//end foreach
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue