diff --git a/app/Aliments.php b/app/Aliments.php index 50f15a3..cef5251 100644 --- a/app/Aliments.php +++ b/app/Aliments.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class Aliments extends Model { public $timestamps = false; + /** * @var string */ diff --git a/app/Console/Commands/ImportMoba.php b/app/Console/Commands/ImportMoba.php index 46d0141..7438ac3 100644 --- a/app/Console/Commands/ImportMoba.php +++ b/app/Console/Commands/ImportMoba.php @@ -44,59 +44,59 @@ class ImportMoba extends Command $path = base_path("resources/flux_in/*.csv"); $logpath = base_path("resources/flux_in/log/log.txt"); - $logs = fopen($logpath, 'a+'); + $logs = fopen($logpath, 'a+'); foreach (glob($path) as $file) { - $flag = true; + $flag = true; $lines = 0; - $filename = substr($file, -14); - $year = substr($filename, 0, 4); - $month = substr($filename, 5, 2); - $day = substr($filename, 8, 2); + $filename = substr($file, -14); + $year = substr($filename, 0, 4); + $month = substr($filename, 5, 2); + $day = substr($filename, 8, 2); $date_emballage_array = Carbon::createFromFormat('Y-m-d', $year . '-' . $month . '-' . $day)->subDay()->toArray(); - $date_emballage = $date_emballage_array['year'] . '-' . $date_emballage_array['month'] . '-' . $date_emballage_array['day']; + $date_emballage = $date_emballage_array['year'] . '-' . $date_emballage_array['month'] . '-' . $date_emballage_array['day']; - if (($handle = fopen($file, "r")) !== FALSE) { - while (($data = fgetcsv($handle, 50000, ";", '"')) !== FALSE) { + if (($handle = fopen($file, "r")) !== false) { + while (($data = fgetcsv($handle, 50000, ";", '"')) !== false) { if ($flag) { $flag = false; continue; } $code_boite = $data[0]; - $code_ede = $data[1]; - //format dans le fichier Y-m-d - $date_ponte = $data[2]; - $code_produit = $data[3]; + $code_ede = $data[1]; + // format dans le fichier Y-m-d + $date_ponte = $data[2]; + $code_produit = $data[3]; $libelle_produit = $data[4]; - $lot_externe = $data[5]; - //format dans le fichier Y-m-d + $lot_externe = $data[5]; + // format dans le fichier Y-m-d $dcr = $data[6]; $ean = $data[7]; - $moba = new Moba(); - $moba->code_boite = $code_boite; - $moba->code_ede = $code_ede; - $moba->date_ponte = $date_ponte; - $moba->code_produit = $code_produit; + $moba = new Moba(); + $moba->code_boite = $code_boite; + $moba->code_ede = $code_ede; + $moba->date_ponte = $date_ponte; + $moba->code_produit = $code_produit; $moba->libelle_produit = $libelle_produit; - $moba->lot_externe = $lot_externe; - $moba->dcr = $dcr; - $moba->date_emballage = $date_emballage; - $moba->ean13 = $ean; + $moba->lot_externe = $lot_externe; + $moba->dcr = $dcr; + $moba->date_emballage = $date_emballage; + $moba->ean13 = $ean; $moba->save(); $lines++; - } - } + }//end while + }//end if fclose($handle); $logtxt = $file . " : " . $lines . " lignes insérées" . PHP_EOL; fwrite($logs, $logtxt); - //scopy($file, 'archives/'.$file); + // scopy($file, 'archives/'.$file); unlink($file); - //il n'y a plus de fichier .ok apparement + // il n'y a plus de fichier .ok apparement @unlink($file . '.ok'); - } + }//end foreach fclose($logs); return 0; diff --git a/app/Console/Commands/LDCWebStatusChecker.php b/app/Console/Commands/LDCWebStatusChecker.php index 43edfb5..22eaf82 100644 --- a/app/Console/Commands/LDCWebStatusChecker.php +++ b/app/Console/Commands/LDCWebStatusChecker.php @@ -1,11 +1,12 @@ 0) { foreach ($files as $file) { $data['logs'] = $data['logs'] + filesize($file); @@ -74,8 +75,8 @@ class LDCWebStatusChecker extends Command $data['code']['version'] = app()->version(); // Send by cURL - $url = 'https://ldc-web.ldc.fr/api/status-checker'; - $ch = curl_init($url); + $url = 'https://ldc-web.ldc.fr/api/status-checker'; + $ch = curl_init($url); $payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)]; curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); diff --git a/app/Console/Commands/MajEleveurs.php b/app/Console/Commands/MajEleveurs.php index 59d84f3..08299bf 100644 --- a/app/Console/Commands/MajEleveurs.php +++ b/app/Console/Commands/MajEleveurs.php @@ -5,7 +5,6 @@ namespace App\Console\Commands; use Illuminate\Console\Command; use App\Moba; - class MajEleveurs extends Command { /** @@ -46,16 +45,16 @@ class MajEleveurs extends Command foreach (glob($path) as $file) { $flag = true; $line = 0; - if (($handle = fopen($file, "r")) !== FALSE) { - while (($data = fgetcsv($handle, 50000, ";", '"')) !== FALSE) { + if (($handle = fopen($file, "r")) !== false) { + while (($data = fgetcsv($handle, 50000, ";", '"')) !== false) { if ($flag) { $flag = false; continue; } $line++; $code_boite = $data[0]; - $ean13 = $data[7]; - $mobas = Moba::where('code_boite', '=', $code_boite)->andWhere('ean13', '=', '')->update(['ean13' => $data[7]]); + $ean13 = $data[7]; + $mobas = Moba::where('code_boite', '=', $code_boite)->andWhere('ean13', '=', '')->update(['ean13' => $data[7]]); echo $line . "\n\r"; } } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index a8c5158..a3d0163 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,19 +13,18 @@ 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) { // $schedule->command('inspire') - // ->hourly(); + // ->hourly(); } /** @@ -35,7 +34,7 @@ class Kernel extends ConsoleKernel */ protected function commands() { - $this->load(__DIR__.'/Commands'); + $this->load(__DIR__ . '/Commands'); require base_path('routes/console.php'); } diff --git a/app/Eleveur.php b/app/Eleveur.php index 718f7fa..255c25d 100644 --- a/app/Eleveur.php +++ b/app/Eleveur.php @@ -4,11 +4,13 @@ namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; + class Eleveur extends Model { use SoftDeletes; public $timestamps = false; + /** * The attributes that are mass assignable. * @@ -36,25 +38,26 @@ class Eleveur extends Model 'marquage_b1', 'marquage_b2' ]; - /** - * @var string - */ - protected $table = 'eleveurs'; + /** + * @var string + */ + protected $table = 'eleveurs'; protected $appends = ['questions']; - public function getQuestionsAttribute(){ - if($this->aboutyou != null && $this->aboutyou != ''){ + public function getQuestionsAttribute() + { + if ($this->aboutyou != null && $this->aboutyou != '') { return true; } - if($this->vocation != null && $this->vocation != ''){ + if ($this->vocation != null && $this->vocation != '') { return true; } - if($this->likeinjob != null && $this->likeinjob != ''){ + if ($this->likeinjob != null && $this->likeinjob != '') { return true; } - if($this->loue_means != null && $this->loue_means != ''){ + if ($this->loue_means != null && $this->loue_means != '') { return true; } return false; diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 47cfb7b..df7b24f 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -13,8 +13,7 @@ class Handler extends ExceptionHandler * @var array */ protected $dontReport = [ - // - ]; + ]; /** * A list of the inputs that are never flashed for validation exceptions. @@ -29,7 +28,7 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Throwable $exception + * @param \Throwable $exception * @return void */ public function report(Throwable $exception) @@ -40,8 +39,8 @@ class Handler extends ExceptionHandler /** * Render an exception into an HTTP response. * - * @param \Illuminate\Http\Request $request - * @param \Throwable $exception + * @param \Illuminate\Http\Request $request + * @param \Throwable $exception * @return \Illuminate\Http\Response */ public function render($request, Throwable $exception) diff --git a/app/Http/Controllers/AjaxController.php b/app/Http/Controllers/AjaxController.php index cbc7fe6..65936f5 100644 --- a/app/Http/Controllers/AjaxController.php +++ b/app/Http/Controllers/AjaxController.php @@ -7,71 +7,77 @@ use App\MiseEnPlace; use App\Aliments; use App\Eleveur; use App\Moba; - use Carbon\Carbon; class AjaxController extends Controller { - - public function importAliment(Request $request){ - $file = $request->file('fileAliment'); - $flag = true; - $total = 0; - $imported = 0; - $error = 0; + public function importAliment(Request $request) + { + $file = $request->file('fileAliment'); + $flag = true; + $total = 0; + $imported = 0; + $error = 0; $errorHtml = ""; - if (($handle = fopen($file, "r")) !== FALSE){ - while (($data = fgetcsv($handle, 50000, ";", '"')) !== FALSE){ - if($flag) { $flag = false; continue; } //skip first row (headers) - if(isset($data[0]) && isset($data[1]) && isset($data[2]) && strpos($data[1], "/") !== false){ + if (($handle = fopen($file, "r")) !== false) { + while (($data = fgetcsv($handle, 50000, ";", '"')) !== false) { + if ($flag) { + $flag = false; + continue; + } //end if + if (isset($data[0]) && isset($data[1]) && isset($data[2]) && strpos($data[1], "/") !== false) { $total++; - $codeLot = $data[0]; - $dateLivraison = $data[1]; + $codeLot = $data[0]; + $dateLivraison = $data[1]; list($d, $m, $y) = explode('/', $dateLivraison); - $date = $y.'-'.$m.'-'.$d; - $aliment = $data[2]; + $date = $y . '-' . $m . '-' . $d; + $aliment = $data[2]; - $alim = new Aliments(); - $alim->code_lot = $codeLot; + $alim = new Aliments(); + $alim->code_lot = $codeLot; $alim->date_livraison = $date; - $alim->type_aliment = $aliment; + $alim->type_aliment = $aliment; - if($alim->save()){ + if ($alim->save()) { $imported++; } else { $error++; $errorHtml = "
  • Les aliments n'ont pu être importés.
  • "; } } - } - } + }//end while + }//end if return json_encode(array('errors' => $error, 'errorHtml' => $errorHtml, 'total' => $total, 'imported' => $imported)); } - public function importMep(Request $request){ + public function importMep(Request $request) + { $file = $request->file('fileMep'); - //var_dump($file); - $flag = true; - $total = 0; - $imported = 0; - $error = 0; + // var_dump($file); + $flag = true; + $total = 0; + $imported = 0; + $error = 0; $errorHtml = ""; - if (($handle = fopen($file, "r")) !== FALSE) { - while (($data = fgetcsv($handle, 50000, ";", '"')) !== FALSE){ - if($flag) { $flag = false; continue; } //skip first row (headers) + if (($handle = fopen($file, "r")) !== false) { + while (($data = fgetcsv($handle, 50000, ";", '"')) !== false) { + if ($flag) { + $flag = false; + continue; + } //end if $total++; $inuavEleveur = $data[10]; - $eleveur = Eleveur::where('code_inuav', 'like', '%' . trim($inuavEleveur) . '%')->first(); - if($eleveur === null){ + $eleveur = Eleveur::where('code_inuav', 'like', '%' . trim($inuavEleveur) . '%')->first(); + if ($eleveur === null) { $error++; - $errorHtml .= "
  • Eleveur non trouvé : ".$data[1]." ".$data[2]."
  • "; + $errorHtml .= "
  • Eleveur non trouvé : " . $data[1] . " " . $data[2] . "
  • "; continue; } else { - if(strpos($data[7], "/") !== false && strpos($data[8], "/") !== false){ - $mep = new MiseEnPlace(); - $mep->eleveurId_pondeuse = $eleveur->id; - $mep->code_lot_pondeuse = $data[6]; + if (strpos($data[7], "/") !== false && strpos($data[8], "/") !== false) { + $mep = new MiseEnPlace(); + $mep->eleveurId_pondeuse = $eleveur->id; + $mep->code_lot_pondeuse = $data[6]; $mep->hectares_parcours_pondeuse = $data[20]; switch ($data[21]) { case 'OUI': @@ -89,71 +95,73 @@ class AjaxController extends Controller $mep->zone_mellifere_pondeuse = 0; break; } - $mep->nom_couvoir = $data[11]; - $mep->ville_couvoir = $data[12]; - $mep->cp_couvoir = $data[13]; + $mep->nom_couvoir = $data[11]; + $mep->ville_couvoir = $data[12]; + $mep->cp_couvoir = $data[13]; $mep->raison_sociale_eleveur_poulettes = $data[14]; - $mep->code_inuav_poulettes = $data[15]; - $mep->nom_eleveur_poulettes = $data[16]; - $mep->prenom_eleveur_poulettes = $data[17]; - $mep->ville_eleveur_poulettes = $data[18]; - $mep->cp_eleveur_poulettes = $data[19]; + $mep->code_inuav_poulettes = $data[15]; + $mep->nom_eleveur_poulettes = $data[16]; + $mep->prenom_eleveur_poulettes = $data[17]; + $mep->ville_eleveur_poulettes = $data[18]; + $mep->cp_eleveur_poulettes = $data[19]; $eleveur->marquage_oeuf = $data[23]; - $eleveur->marquage_b1 = $data[24]; - $eleveur->marquage_b2 = $data[25]; + $eleveur->marquage_b1 = $data[24]; + $eleveur->marquage_b2 = $data[25]; $eleveur->save(); list($d_naissance, $m_naissance, $y_naissance) = explode('/', $data[7]); list($d_transfert, $m_transfert, $y_transfert) = explode('/', $data[8]); - $mep->date_naissance_poulettes = $y_naissance.'-'.$m_naissance.'-'.$d_naissance; - $mep->date_transfert_poulettes = $y_transfert.'-'.$m_transfert.'-'.$d_transfert; + $mep->date_naissance_poulettes = $y_naissance . '-' . $m_naissance . '-' . $d_naissance; + $mep->date_transfert_poulettes = $y_transfert . '-' . $m_transfert . '-' . $d_transfert; $mep->save(); $imported++; - } - } - - } - } + }//end if + }//end if + }//end while + }//end if return json_encode(array('errors' => $error, 'errorHtml' => $errorHtml, 'total' => $total, 'imported' => $imported)); } - public function rotateToRight(Request $request) { + public function rotateToRight(Request $request) + { $home = url('/'); $test = $request->filePath; // -90deg - $im = imagecreatefromjpeg($request->filePath); + $im = imagecreatefromjpeg($request->filePath); $rotate = imagerotate($im, -90, 0); imagejpeg($rotate, $test, 100); - return json_encode($home.'/'.$test); + return json_encode($home . '/' . $test); } - public function rotateToLeft(Request $request) { + public function rotateToLeft(Request $request) + { $home = url('/'); $test = $request->filePath; // 90deg - $im = imagecreatefromjpeg($request->filePath); + $im = imagecreatefromjpeg($request->filePath); $rotate = imagerotate($im, 90, 0); imagejpeg($rotate, $test, 100); - return json_encode($home.'/'.$test); + return json_encode($home . '/' . $test); } - public function findMyBox(Request $request) { - $code = $request->code; - $date = explode('/', $request->date); - $day = $date[0]; + public function findMyBox(Request $request) + { + $code = $request->code; + $date = explode('/', $request->date); + $day = $date[0]; $month = $date[1]; $dateCarbon = Carbon::createFromDate(null, $month, $day)->toArray(); - $year = $dateCarbon['year']; - $dcr = $year.'-'.$month.'-'.$day; + $year = $dateCarbon['year']; + $dcr = $year . '-' . $month . '-' . $day; $moba = Moba::where(['code_ede' => $code, 'dcr' => $dcr])->orderBy('id', 'DESC')->first(); - if(!$moba){ + if (!$moba) { return redirect()->route('erreur404'); } diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php index 3559954..7bed2bd 100644 --- a/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -8,16 +8,15 @@ 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; /** diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 465c39c..75ef4e6 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -8,15 +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; } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index ed5b590..c917a7e 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -8,16 +8,15 @@ 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; /** diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 8c47789..908fc35 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -11,16 +11,15 @@ 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 +42,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) @@ -59,7 +58,7 @@ class RegisterController extends Controller /** * Create a new user instance after a valid registration. * - * @param array $data + * @param array $data * @return \App\User */ protected function create(array $data) diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index fe965b2..f0df4df 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -8,16 +8,15 @@ 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; /** diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 23a43a8..b3459cb 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -8,16 +8,15 @@ 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; /** diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 03e02a2..6c453fe 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -9,5 +9,7 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests; class Controller extends BaseController { - use AuthorizesRequests, DispatchesJobs, ValidatesRequests; + use AuthorizesRequests; + use DispatchesJobs; + use ValidatesRequests; } diff --git a/app/Http/Controllers/EleveurController.php b/app/Http/Controllers/EleveurController.php index 26b6d9c..097e097 100644 --- a/app/Http/Controllers/EleveurController.php +++ b/app/Http/Controllers/EleveurController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers; use App\Eleveur; -use Illuminate\Http\Request; use App\Http\Requests\MyRequest; use Response; @@ -34,7 +33,7 @@ class EleveurController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(MyRequest $request) @@ -45,44 +44,44 @@ class EleveurController extends Controller ]); - $eleveur = new Eleveur(); - $eleveur->code_cafel = $request->code_cafel; - $eleveur->code_ede = $request->code_ede; - $eleveur->civilite = $request->civilite; - $eleveur->nom = $request->nom; - $eleveur->prenom = $request->prenom; - $eleveur->naissance = $request->naissance; - $eleveur->cp = $request->cp; - $eleveur->ville = $request->ville; + $eleveur = new Eleveur(); + $eleveur->code_cafel = $request->code_cafel; + $eleveur->code_ede = $request->code_ede; + $eleveur->civilite = $request->civilite; + $eleveur->nom = $request->nom; + $eleveur->prenom = $request->prenom; + $eleveur->naissance = $request->naissance; + $eleveur->cp = $request->cp; + $eleveur->ville = $request->ville; $eleveur->elv_date_debut = $request->elv_date_debut; - $eleveur->code_inuav = $request->code_inuav; - $eleveur->marquage_oeuf = $request->marquage_oeuf; - $eleveur->marquage_b1 = $request->marquage_b1; - $eleveur->marquage_b2 = $request->marquage_b2; + $eleveur->code_inuav = $request->code_inuav; + $eleveur->marquage_oeuf = $request->marquage_oeuf; + $eleveur->marquage_b1 = $request->marquage_b1; + $eleveur->marquage_b2 = $request->marquage_b2; - if(isset($request->exploitation) && !empty($request->exploitation)){ + if (isset($request->exploitation) && !empty($request->exploitation)) { $eleveur->exploitation = $request->exploitation; } - if(isset($request->aboutyou) && !empty($request->aboutyou)){ + if (isset($request->aboutyou) && !empty($request->aboutyou)) { $eleveur->aboutyou = $request->aboutyou; } - if(isset($request->vocation) && !empty($request->vocation)){ + if (isset($request->vocation) && !empty($request->vocation)) { $eleveur->vocation = $request->vocation; } - if(isset($request->likeinjob) && !empty($request->likeinjob)){ + if (isset($request->likeinjob) && !empty($request->likeinjob)) { $eleveur->likeinjob = $request->likeinjob; } - if(isset($request->loue_means) && !empty($request->loue_means)){ + if (isset($request->loue_means) && !empty($request->loue_means)) { $eleveur->loue_means = $request->loue_means; } - if ($request->photo1){ - $path = $request->photo1->store('images/photos'); - $path = str_replace('public/', '', $path); + if ($request->photo1) { + $path = $request->photo1->store('images/photos'); + $path = str_replace('public/', '', $path); $eleveur->path_photo1 = $path; } - if ($request->photo2){ - $path2 = $request->photo2->store('images/photos'); - $path2 = str_replace('public/', '', $path2); + if ($request->photo2) { + $path2 = $request->photo2->store('images/photos'); + $path2 = str_replace('public/', '', $path2); $eleveur->path_photo2 = $path2; } $eleveur->save(); @@ -93,18 +92,17 @@ class EleveurController extends Controller /** * Display the specified resource. * - * @param \App\Eleveur $eleveur + * @param \App\Eleveur $eleveur * @return \Illuminate\Http\Response */ public function show(Eleveur $eleveur) { - } /** * Show the form for editing the specified resource. * - * @param \App\Eleveur $eleveur + * @param \App\Eleveur $eleveur * @return \Illuminate\Http\Response */ public function edit(Eleveur $eleveur) @@ -115,8 +113,8 @@ class EleveurController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\Request $request - * @param \App\Eleveur $eleveur + * @param \Illuminate\Http\Request $request + * @param \App\Eleveur $eleveur * @return \Illuminate\Http\Response */ public function update(MyRequest $request, Eleveur $eleveur) @@ -128,7 +126,7 @@ class EleveurController extends Controller $datas = collect($request->all()); - if ($request->photo1){ + if ($request->photo1) { $path = $request->photo1->store('images/photos'); $path = str_replace('public/', '', $path); $datas->put('path_photo1', $path); @@ -136,7 +134,7 @@ class EleveurController extends Controller $datas->put('path_photo1', $request->input('path_photo1_hidden')); } - if ($request->photo2){ + if ($request->photo2) { $path2 = $request->photo2->store('images/photos'); $path2 = str_replace('public/', '', $path2); $datas->put('path_photo2', $path2); @@ -152,15 +150,15 @@ class EleveurController extends Controller /** * Remove the specified resource from storage. * - * @param \App\Eleveur $eleveur + * @param \App\Eleveur $eleveur * @return \Illuminate\Http\Response */ public function destroy(Eleveur $eleveur) { - // } - public function export(){ + public function export() + { $headers = array( "Content-Encoding" => "UTF-8", "Content-type" => "Content-type: text/csv; charset=UTF-8", @@ -171,23 +169,23 @@ class EleveurController extends Controller ); $eleveurs = Eleveur::all(); - $columns = array('Code Cafel', 'Code EDE', 'Nom', 'Prénom', 'Naissance', 'CP', 'Ville', 'Date Début Elevage', 'Code INUAV', 'Infos Exploitation', 'A propos de l\'éleveur', 'Toujours été éleveur', 'Ce que l\'éleveur aimes', 'Loué ?', 'Photo 1', 'Photo 2' ); + $columns = array('Code Cafel', 'Code EDE', 'Nom', 'Prénom', 'Naissance', 'CP', 'Ville', 'Date Début Elevage', 'Code INUAV', 'Infos Exploitation', 'A propos de l\'éleveur', 'Toujours été éleveur', 'Ce que l\'éleveur aimes', 'Loué ?', 'Photo 1', 'Photo 2' ); - $callback = function() use ($eleveurs, $columns) - { + $callback = function () use ($eleveurs, $columns) { $file = fopen('php://output', 'w'); - fputs($file, "\xEF\xBB\xBF"); // use BOM for Office + fputs($file, "\xEF\xBB\xBF"); +// use BOM for Office fputcsv($file, $columns, ";"); - foreach($eleveurs as $eleveur) { - if($eleveur->path_photo1 != ""){ + foreach ($eleveurs as $eleveur) { + if ($eleveur->path_photo1 != "") { $photo1 = "OUI"; - }else { + } else { $photo1 = "NON"; } - if($eleveur->path_photo2 != ""){ + if ($eleveur->path_photo2 != "") { $photo2 = "OUI"; - }else { + } else { $photo2 = "NON"; } fputcsv($file, array($eleveur->code_cafel, $eleveur->code_ede, $eleveur->nom, $eleveur->prenom, $eleveur->naissance, $eleveur->cp, $eleveur->ville, $eleveur->elv_date_debut, $eleveur->code_inuav, $eleveur->exploitation, $eleveur->aboutyou, $eleveur->vocation, $eleveur->likeinjob, $eleveur->loue_means, $photo1, $photo2), ";"); diff --git a/app/Http/Controllers/FrontController.php b/app/Http/Controllers/FrontController.php index d58d271..652a654 100644 --- a/app/Http/Controllers/FrontController.php +++ b/app/Http/Controllers/FrontController.php @@ -9,21 +9,21 @@ use App\Moba; use App\VisuelLibelle; use Carbon\Carbon; - class FrontController extends Controller { public function indexId($id) { $multiple = false; - $mobas = Moba::where('code_boite', $id)->orderBy('id', 'DESC')->first(); + $mobas = Moba::where('code_boite', $id)->orderBy('id', 'DESC')->first(); - if (!$mobas) + if (!$mobas) { return redirect('/search'); + } $edes = $mobas->code_edes; - //check if Bio or not - $code_ede = $mobas->code_ede; + // check if Bio or not + $code_ede = $mobas->code_ede; $code_prod = substr($code_ede, 0, 1); if ($code_prod === 0) { @@ -32,13 +32,13 @@ class FrontController extends Controller session(['subColor' => 'blue']); } - $datePonte = $mobas->date_ponte; - $dcr = $mobas->dcr; + $datePonte = $mobas->date_ponte; + $dcr = $mobas->dcr; $date_emballage = $mobas->date_emballage; - //Compare DCR et Today - $date_dcr = Carbon::createFromFormat('Y-m-d', $dcr); + // Compare DCR et Today + $date_dcr = Carbon::createFromFormat('Y-m-d', $dcr); $date_today = Carbon::now(); - $dcrGood = $date_today < $date_dcr; + $dcrGood = $date_today < $date_dcr; $eleveurs = Eleveur::whereIn('code_ede', $edes)->get(); if (!$eleveurs) { @@ -56,7 +56,7 @@ class FrontController extends Controller if ($mep) { $aliment = Aliments::where('code_lot', $mep->code_lot_pondeuse)->orderBy('id', 'DESC')->first(); } else { - $mep = ''; + $mep = ''; $aliment = ""; } $dataVisuel = VisuelLibelle::where('ean13', $mobas->ean13)->first(); @@ -77,22 +77,22 @@ class FrontController extends Controller public function EleveurPortrait($id, $eleveurId) { - $dateToday = Carbon::now()->toArray(); + $dateToday = Carbon::now()->toArray(); $currentYear = $dateToday['year']; $eleveur = Eleveur::where('id', $eleveurId)->first(); if (isset($eleveur->naissance) && !empty($eleveur->naissance)) { $date_naissance = Carbon::createFromFormat('d/m/Y', $eleveur->naissance)->toArray(); - $year = $date_naissance['year']; - $age = $currentYear - $year; + $year = $date_naissance['year']; + $age = $currentYear - $year; } else { $age = false; } if (isset($eleveur->elv_date_debut) && !empty($eleveur->elv_date_debut)) { $date_elevage = Carbon::createFromFormat('d/m/Y', $eleveur->elv_date_debut)->toArray(); $year_elevage = $date_elevage['year']; - $age_elevage = $currentYear - $year_elevage; + $age_elevage = $currentYear - $year_elevage; } else { $age_elevage = false; } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index a4be5c5..17a84dc 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -9,7 +9,7 @@ class Authenticate extends Middleware /** * Get the path the user should be redirected to when they are not authenticated. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * @return string */ protected function redirectTo($request) diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php index 35b9824..9037ddf 100644 --- a/app/Http/Middleware/CheckForMaintenanceMode.php +++ b/app/Http/Middleware/CheckForMaintenanceMode.php @@ -12,6 +12,5 @@ class CheckForMaintenanceMode extends Middleware * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 033136a..20c5039 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -12,6 +12,5 @@ class EncryptCookies extends Middleware * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index e4cec9c..6e2a96b 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -10,9 +10,9 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null $guard + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard * @return mixed */ public function handle($request, Closure $next, $guard = null) diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 1f70e67..b7f30ff 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -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_ALL; } diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 324a166..6990b6d 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -9,7 +9,7 @@ class VerifyCsrfToken extends Middleware /** * Indicates whether the XSRF-TOKEN cookie should be set on the response. * - * @var bool + * @var boolean */ protected $addHttpCookie = true; @@ -19,6 +19,5 @@ class VerifyCsrfToken extends Middleware * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Requests/MyRequest.php b/app/Http/Requests/MyRequest.php index 6412d06..eb05d9a 100644 --- a/app/Http/Requests/MyRequest.php +++ b/app/Http/Requests/MyRequest.php @@ -9,7 +9,7 @@ class MyRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { @@ -34,7 +34,7 @@ class MyRequest extends FormRequest * * @return array */ - public function messages() + public function messages() { return [ 'photo1.max' => 'La Photo 1 ne doit pas dépasser 500 Ko', @@ -43,6 +43,6 @@ class MyRequest extends FormRequest 'photo2.max' => 'La Photo 2 ne doit pas dépasser 500 Ko', 'photo2.mimetypes' => 'La Photo 2 doit être un jpg', 'photo2.uploaded' => 'La Photo 2 ne doit pas dépasser 500 Ko', - ]; + ]; } } diff --git a/app/MiseEnPlace.php b/app/MiseEnPlace.php index ac5f234..7060e70 100644 --- a/app/MiseEnPlace.php +++ b/app/MiseEnPlace.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class MiseEnPlace extends Model { public $timestamps = false; + /** * @var string */ @@ -18,19 +19,19 @@ class MiseEnPlace extends Model * @var array */ protected $fillable = [ - 'eleveurId_pondeuse', - 'code_lot_pondeuse', - 'hectares_parcours_pondeuse', - 'presence_ruche_pondeuse', - 'zone_mellifere_pondeuse', - 'nom_couvoir', - 'ville_couvoir', - 'cp_couvoir', - 'raison_sociale_eleveur_poulettes', - 'code_inuav_poulettes', - 'nom_eleveur_poulettes', - 'prenom_eleveur_poulettes', - 'ville_eleveur_poulettes', + 'eleveurId_pondeuse', + 'code_lot_pondeuse', + 'hectares_parcours_pondeuse', + 'presence_ruche_pondeuse', + 'zone_mellifere_pondeuse', + 'nom_couvoir', + 'ville_couvoir', + 'cp_couvoir', + 'raison_sociale_eleveur_poulettes', + 'code_inuav_poulettes', + 'nom_eleveur_poulettes', + 'prenom_eleveur_poulettes', + 'ville_eleveur_poulettes', 'cp_eleveur_poulettes', 'date_naissance_poulettes', 'date_transfert_poulettes' diff --git a/app/Moba.php b/app/Moba.php index 24b8f7c..ab42ddf 100644 --- a/app/Moba.php +++ b/app/Moba.php @@ -14,5 +14,4 @@ class Moba extends Model { return Moba::select('code_ede')->where('code_boite', $this->code_boite)->distinct()->get()->pluck('code_ede'); } - } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index d85969f..cecfc11 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -14,7 +14,6 @@ class AppServiceProvider extends ServiceProvider */ public function register() { - // } /** @@ -24,11 +23,11 @@ class AppServiceProvider extends ServiceProvider */ public function boot(Request $request) { - $proxy_url = env('PROXY_URL'); - $host = $request->getHost(); - if($this->app->environment('dev')) { + $proxy_url = env('PROXY_URL'); + $host = $request->getHost(); + if ($this->app->environment('dev')) { \URL::forceScheme('https'); - } elseif($this->app->environment('production')) { + } elseif ($this->app->environment('production')) { \URL::forceRootUrl($proxy_url); \URL::forceScheme('https'); } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 3049068..7971bf7 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { @@ -24,7 +23,5 @@ class AuthServiceProvider extends ServiceProvider public function boot() { $this->registerPolicies(); - - // } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 723a290..beda950 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -5,7 +5,6 @@ namespace App\Providers; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; class EventServiceProvider extends ServiceProvider { @@ -28,7 +27,5 @@ class EventServiceProvider extends ServiceProvider public function boot() { parent::boot(); - - // } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 548e4be..2795588 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -23,7 +23,6 @@ class RouteServiceProvider extends ServiceProvider */ public function boot() { - // parent::boot(); } @@ -38,8 +37,6 @@ class RouteServiceProvider extends ServiceProvider $this->mapApiRoutes(); $this->mapWebRoutes(); - - // } /** diff --git a/app/User.php b/app/User.php index 38ef04b..bb331d7 100644 --- a/app/User.php +++ b/app/User.php @@ -2,7 +2,6 @@ namespace App; -use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; diff --git a/config/app.php b/config/app.php index 5cb7bdb..adb3c6e 100644 --- a/config/app.php +++ b/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' => 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' => 'en', /* - |-------------------------------------------------------------------------- - | 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' => 'en_US', /* - |-------------------------------------------------------------------------- - | 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' => [ @@ -178,14 +178,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' => [ diff --git a/config/auth.php b/config/auth.php index aaf982b..2051dfd 100644 --- a/config/auth.php +++ b/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", "token" - | + |-------------------------------------------------------------------------- + | 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", "token" + | */ 'guards' => [ @@ -49,20 +49,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' => [ @@ -72,24 +72,24 @@ return [ ], // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', + // 'driver' => 'database', + // 'table' => 'users', // ], ], /* - |-------------------------------------------------------------------------- - | 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' => [ @@ -102,14 +102,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, diff --git a/config/broadcasting.php b/config/broadcasting.php index 3bba110..758e391 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -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", "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", "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' => [ diff --git a/config/cache.php b/config/cache.php index 46751e6..f765d26 100644 --- a/config/cache.php +++ b/config/cache.php @@ -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. - | - | Supported: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb" - | + |-------------------------------------------------------------------------- + | 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. + | + | Supported: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb" + | */ '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. - | + |-------------------------------------------------------------------------- + | 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. + | */ 'stores' => [ @@ -88,16 +88,16 @@ 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'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), ]; diff --git a/config/database.php b/config/database.php index 199382d..fb6ba64 100644 --- a/config/database.php +++ b/config/database.php @@ -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' => [ @@ -123,7 +123,7 @@ return [ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), ], 'default' => [ diff --git a/config/filesystems.php b/config/filesystems.php index c16a858..48a2ad5 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -3,42 +3,42 @@ 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'), /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | + |-------------------------------------------------------------------------- + | Default Cloud Filesystem Disk + |-------------------------------------------------------------------------- + | + | Many applications store files both locally and in the cloud. For this + | reason, you may specify a default "cloud" driver here. This driver + | will be bound as the Cloud disk implementation in the container. + | */ 'cloud' => env('FILESYSTEM_CLOUD', '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" - | + |-------------------------------------------------------------------------- + | 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' => [ @@ -51,7 +51,7 @@ return [ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', + 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', ], diff --git a/config/hashing.php b/config/hashing.php index 8425770..6641c8c 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -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' => [ diff --git a/config/logging.php b/config/logging.php index 0df8212..2a6a5bf 100644 --- a/config/logging.php +++ b/config/logging.php @@ -7,31 +7,31 @@ 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'), /* - |-------------------------------------------------------------------------- - | 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' => [ diff --git a/config/mail.php b/config/mail.php index c583d5a..8e0d1f3 100644 --- a/config/mail.php +++ b/config/mail.php @@ -3,56 +3,56 @@ return [ /* - |-------------------------------------------------------------------------- - | Mail Driver - |-------------------------------------------------------------------------- - | - | Laravel supports both SMTP and PHP's "mail" function as drivers for the - | sending of e-mail. You may specify which one you're using throughout - | your application here. By default, Laravel is setup for SMTP mail. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", - | "postmark", "log", "array" - | + |-------------------------------------------------------------------------- + | Mail Driver + |-------------------------------------------------------------------------- + | + | Laravel supports both SMTP and PHP's "mail" function as drivers for the + | sending of e-mail. You may specify which one you're using throughout + | your application here. By default, Laravel is setup for SMTP mail. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" + | */ 'driver' => env('MAIL_MAILER', 'smtp'), /* - |-------------------------------------------------------------------------- - | SMTP Host Address - |-------------------------------------------------------------------------- - | - | Here you may provide the host address of the SMTP server used by your - | applications. A default option is provided that is compatible with - | the Mailgun mail service which will provide reliable deliveries. - | + |-------------------------------------------------------------------------- + | SMTP Host Address + |-------------------------------------------------------------------------- + | + | Here you may provide the host address of the SMTP server used by your + | applications. A default option is provided that is compatible with + | the Mailgun mail service which will provide reliable deliveries. + | */ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), /* - |-------------------------------------------------------------------------- - | SMTP Host Port - |-------------------------------------------------------------------------- - | - | This is the SMTP port used by your application to deliver e-mails to - | users of the application. Like the host we have set this value to - | stay compatible with the Mailgun e-mail application by default. - | + |-------------------------------------------------------------------------- + | SMTP Host Port + |-------------------------------------------------------------------------- + | + | This is the SMTP port used by your application to deliver e-mails to + | users of the application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail application by default. + | */ 'port' => env('MAIL_PORT', 587), /* - |-------------------------------------------------------------------------- - | 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' => [ @@ -61,27 +61,27 @@ return [ ], /* - |-------------------------------------------------------------------------- - | E-Mail Encryption Protocol - |-------------------------------------------------------------------------- - | - | Here you may specify the encryption protocol that should be used when - | the application send e-mail messages. A sensible default using the - | transport layer security protocol should provide great security. - | + |-------------------------------------------------------------------------- + | E-Mail Encryption Protocol + |-------------------------------------------------------------------------- + | + | Here you may specify the encryption protocol that should be used when + | the application send e-mail messages. A sensible default using the + | transport layer security protocol should provide great security. + | */ 'encryption' => env('MAIL_ENCRYPTION', 'tls'), /* - |-------------------------------------------------------------------------- - | SMTP Server Username - |-------------------------------------------------------------------------- - | - | If your SMTP server requires a username for authentication, you should - | set it here. This will get used to authenticate with your server on - | connection. You may also set the "password" value below this one. - | + |-------------------------------------------------------------------------- + | SMTP Server Username + |-------------------------------------------------------------------------- + | + | If your SMTP server requires a username for authentication, you should + | set it here. This will get used to authenticate with your server on + | connection. You may also set the "password" value below this one. + | */ 'username' => env('MAIL_USERNAME'), @@ -89,27 +89,27 @@ return [ 'password' => env('MAIL_PASSWORD'), /* - |-------------------------------------------------------------------------- - | Sendmail System Path - |-------------------------------------------------------------------------- - | - | When using the "sendmail" driver to send e-mails, we will need to know - | the path to where Sendmail lives on this server. A default path has - | been provided here, which will work well on most of your systems. - | + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | */ 'sendmail' => '/usr/sbin/sendmail -bs', /* - |-------------------------------------------------------------------------- - | 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' => [ @@ -121,14 +121,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Log Channel - |-------------------------------------------------------------------------- - | - | If you are using the "log" driver, you may specify the logging channel - | if you prefer to keep mail messages separate from other log entries - | for simpler reading. Otherwise, the default channel will be used. - | + |-------------------------------------------------------------------------- + | Log Channel + |-------------------------------------------------------------------------- + | + | If you are using the "log" driver, you may specify the logging channel + | if you prefer to keep mail messages separate from other log entries + | for simpler reading. Otherwise, the default channel will be used. + | */ 'log_channel' => env('MAIL_LOG_CHANNEL'), diff --git a/config/queue.php b/config/queue.php index 3a30d6c..f00417e 100644 --- a/config/queue.php +++ b/config/queue.php @@ -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' => [ @@ -69,14 +69,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' => [ diff --git a/config/services.php b/config/services.php index 2a1d616..915dfe7 100644 --- a/config/services.php +++ b/config/services.php @@ -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' => [ diff --git a/config/session.php b/config/session.php index aadd44d..49cad41 100644 --- a/config/session.php +++ b/config/session.php @@ -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,92 +36,92 @@ 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 - |-------------------------------------------------------------------------- - | - | When using the "apc", "memcached", or "dynamodb" session drivers 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". - | + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | When using the "apc", "memcached", or "dynamodb" session drivers 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". + | */ '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( @@ -130,68 +130,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 if it can not 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 if it can not be done securely. + | */ 'secure' => env('SESSION_SECURE_COOKIE', null), /* - |-------------------------------------------------------------------------- - | 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 - | do not enable this as other CSRF protection services are in place. - | - | Supported: "lax", "strict" - | + |-------------------------------------------------------------------------- + | 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 + | do not enable this as other CSRF protection services are in place. + | + | Supported: "lax", "strict" + | */ 'same_site' => null, diff --git a/config/view.php b/config/view.php index 22b8a18..53008fd 100644 --- a/config/view.php +++ b/config/view.php @@ -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( diff --git a/routes/api.php b/routes/api.php index c641ca5..588be64 100644 --- a/routes/api.php +++ b/routes/api.php @@ -3,14 +3,14 @@ use Illuminate\Http\Request; /* -|-------------------------------------------------------------------------- -| 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! -| + |-------------------------------------------------------------------------- + | 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! + | */ Route::middleware('auth:api')->get('/user', function (Request $request) { diff --git a/routes/channels.php b/routes/channels.php index f16a20b..1e36a53 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -1,16 +1,16 @@ id === (int) $id; + return (int)$user->id === (int)$id; }); diff --git a/routes/console.php b/routes/console.php index 75dd0cd..23c267d 100644 --- a/routes/console.php +++ b/routes/console.php @@ -3,14 +3,14 @@ use Illuminate\Foundation\Inspiring; /* -|-------------------------------------------------------------------------- -| 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 () { diff --git a/routes/web.php b/routes/web.php index 02a70a2..48cd0d3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,14 +1,14 @@ false, 'register' => false, 'reset' => false]); @@ -63,22 +63,21 @@ Route::get('/{id}/elevage-liberte', function ($id) { })->name('infoElevageLib'); -//ALIMENTATION +// ALIMENTATION Route::get('/{id}/details-alimentation', function ($id) { return view('themes.loue.details-alimentation', ['id' => $id]); })->name('infoAlim'); -//EMBALLAGE +// EMBALLAGE Route::get('/{id}/details-emballage', function ($id) { return view('themes.loue.details-emballage', ['id' => $id]); })->name('infoEmballage'); -//ELEVEURS +// ELEVEURS Route::get('/{id}/portrait-eleveur/{eleveurId}', 'FrontController@EleveurPortrait')->name('portraitEleveur'); -//return view('themes.loue.elevages.portrait'); - +// return view('themes.loue.elevages.portrait'); Route::get('/charte-confidentialite', function () { return view('themes.loue.policy'); })->name('policy'); diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 547152f..ab92402 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -13,7 +13,7 @@ trait CreatesApplication */ public function createApplication() { - $app = require __DIR__.'/../bootstrap/app.php'; + $app = require __DIR__ . '/../bootstrap/app.php'; $app->make(Kernel::class)->bootstrap(); diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index cdb5111..8fbf370 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -2,7 +2,6 @@ namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class ExampleTest extends TestCase diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 266ef35..06ece2c 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -2,7 +2,6 @@ namespace Tests\Unit; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class ExampleTest extends TestCase