class CommandCrudController extends \Cubist\Backpack\app\Magic\Controllers\CubistMagicController
{
- protected $_modelNamespace = 'App\Models\Command';
+ protected $_modelNamespace = 'App\Models\Order';
protected $_routeURL = 'command';
protected $_singular = 'Commande';
protected $_plural = 'Commandes';
namespace App\Http\Controllers;
-use App\Models\Command;
+use App\Models\Order;
use App\Models\Panier;
use Cubist\Backpack\Facades\App;
use App\Models\Page;
$productsInfosBase = Product::getProductsByIds($ids);
$currentCartRef = Panier::getRefs($data['products']);
- $data = Command::fillData($currentCartRef,$data,$productsInfosBase);
+ $data = Order::fillData($currentCartRef,$data,$productsInfosBase);
if($data) {
- $order = Command::create($data);
+ $order = Order::create($data);
$order->save();
}else{
abort('422', 'Datas are empty');
$this->token = $token;
}
- public function via($notifiable)
- {
- return ['mail'];
- }
-
public function toMail($notifiable)
{
return (new MailMessage())
namespace App\Http\Controllers\Client;
use App\Models\AuthClient;
-use App\Models\Client;
-use Backpack\Base\app\Notifications\ResetPasswordNotification as ResetPasswordNotification;
use Carbon\Carbon;
-use Cubist\Backpack\Facades\App;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
-use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\DB;
-use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Password;
class ForgotPasswordController
<?php
namespace App\Models;
-use Backpack\Base\app\Notifications\ResetPasswordNotification as ResetPasswordNotification;
use Cubist\Backpack\Facades\App;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
+++ /dev/null
-<?php
-namespace App\Models;
-
-class Command extends CommandPanierSchema
-{
- protected $table = 'command';
-
- protected $_options = ['name' => 'command',
- 'singular' => 'Commande',
- 'plural' => 'Commandes'];
-
- private static $_optionsForSelect = [
- 'new' => 'Nouvelle',
- 'pending' => 'En attente de règlement',
- 'in_progress' => 'En cours',
- 'done' => 'Clôturée',
- ];
-
- public function setFields()
- {
- parent::setFields();
-
- foreach ($this->fields as $fields) {
- $fields['tab'] = 'Informations';
- $this->addField($fields);
- }
-
- $this->addField(['name' => 'status',
- 'label' => 'Statut',
- 'type' => 'SelectFromArray',
- 'column' => true,
- 'options' => self::$_optionsForSelect,
- 'default' => 'new',
- 'tab' => 'Informations'
- ]);
-
- $this->addField(['name' => 'complete_status',
- 'label' => 'Indication du statut',
- 'type' => 'Text',
- 'tab' => 'Informations'
- ]);
- }
-
- public static function getOptionValue($key) {
- if($key)
- return self::$_optionsForSelect[$key];
-
- return false;
- }
-}
--- /dev/null
+<?php
+namespace App\Models;
+
+class Order extends CommandPanierSchema
+{
+ protected $table = 'order';
+
+ protected $_options = ['name' => 'order',
+ 'singular' => 'Order',
+ 'plural' => 'Orders'];
+
+ private static $_optionsForSelect = [
+ 'new' => 'Nouvelle',
+ 'pending' => 'En attente de règlement',
+ 'in_progress' => 'En cours',
+ 'done' => 'Clôturée',
+ ];
+
+ public function setFields()
+ {
+ parent::setFields();
+
+ foreach ($this->fields as $fields) {
+ $fields['tab'] = 'Informations';
+ $this->addField($fields);
+ }
+
+ $this->addField(['name' => 'status',
+ 'label' => 'Statut',
+ 'type' => 'SelectFromArray',
+ 'column' => true,
+ 'options' => self::$_optionsForSelect,
+ 'default' => 'new',
+ 'tab' => 'Informations'
+ ]);
+
+ $this->addField(['name' => 'complete_status',
+ 'label' => 'Indication du statut',
+ 'type' => 'Text',
+ 'tab' => 'Informations'
+ ]);
+ }
+
+ public static function getOptionValue($key) {
+ if($key)
+ return self::$_optionsForSelect[$key];
+
+ return false;
+ }
+}
namespace App\Templates;
-use App\Models\Command;
+use App\Models\Order;
class MyOrder extends Base
{
public function setData(&$data)
{
- $data["items"] = Command::getAllByUserId();
+ $data["items"] = Order::getAllByUserId();
}
public function init()
'regards' => 'Regards',
'footer_part1' => 'If you’re having trouble clicking the',
'footer_part2' => 'button, copy and paste the URL below',
- 'footer_part3' => ' into your web browser:<br class="util">',
+ 'footer_part3' => " into your web browser:\n\n",
];
'regards' => 'Salutations',
'footer_part1' => 'Si vous ne parvenez pas à cliquer sur le bouton',
'footer_part2' => "copiez et collez l'URL ci-dessous",
- 'footer_part3' => 'dans votre navigateur Web:<br class="util">',
+ 'footer_part3' => "dans votre navigateur Web :\n\n",
];
<div class="cartsave-products">
@foreach(json_decode($item['products'], true) as $key => $product)
<grid gap="md" class="sm:grid-cols-1 cartsave-grid">
- <div class="product-thumbnail bg-center bg-contain bg-no-repeat" style='background-image : url("{{ $product['image'] }}")'>
+ <div class="product-thumbnail bg-center bg-contain bg-no-repeat"
+ style='background-image : url("{{ $product['image'] }}")'>
</div>
<div class="product-infos flex justify-between items-center">
<div>
@endif
@endisset
@endif
- <p class="no-m">{{ __('Quantité') }} : <span class="text-navy">{{$product['quantity']}}</span></p>
+ <p class="no-m">{{ __('Quantité') }} : <span
+ class="text-navy">{{$product['quantity']}}</span></p>
</div>
<div class="product-price">
@if(floatval($product['price']))
<p class="text-navy">
N/A
<span
- data-tooltip="{{__('Prix sur devis.')}}"
- class="font-display text-lg inline-block align-middle rounded-full border-grey-dark border-2 h-8 w-8 text-center ml-3">?</span>
+ data-tooltip="{{__('Prix sur devis.')}}"
+ class="font-display text-lg inline-block align-middle rounded-full border-grey-dark border-2 h-8 w-8 text-center ml-3">?</span>
</p>
@endif
</div>
<div>
<p class="no-m">{{ __('Statut') }}</p>
<p class="no-m text-navy">
- {{ \App\Models\Command::getOptionValue($item['status']) }}
+ {{ \App\Models\Order::getOptionValue($item['status']) }}
@if($item['complete_status'])
· {{ $item['complete_status'] }}
@endif