restart
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Auth;
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
@@ -26,7 +26,7 @@ class ConfirmPasswordController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '';
|
||||
protected $redirectTo = '/admin';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
38
app/Http/Controllers/Admin/Auth/ForgotPasswordController.php
Normal file
38
app/Http/Controllers/Admin/Auth/ForgotPasswordController.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
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.
|
||||
|
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
public function showLinkRequestForm()
|
||||
{
|
||||
$data = \App\Repositories\Config::init();
|
||||
return view('auth.passwords.email', $data);
|
||||
}
|
||||
}
|
||||
35
app/Http/Controllers/Admin/Auth/LoginController.php
Normal file
35
app/Http/Controllers/Admin/Auth/LoginController.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
use AuthenticatesUsers;
|
||||
protected $redirectTo = '/admin';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest')->except('logout');
|
||||
$this->middleware('guest:web')->except('logout');
|
||||
}
|
||||
|
||||
public function showLoginForm()
|
||||
{
|
||||
return view('auth.login');
|
||||
}
|
||||
|
||||
public function authenticated(Request $request, $user)
|
||||
{
|
||||
return redirect()->intended($this->redirectPath());
|
||||
}
|
||||
|
||||
public function username()
|
||||
{
|
||||
return 'username';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
76
app/Http/Controllers/Admin/Auth/RegisterController.php
Normal file
76
app/Http/Controllers/Admin/Auth/RegisterController.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
|
||||
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.
|
||||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/admin';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a validator for an incoming registration request.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make(
|
||||
$data, [
|
||||
'name' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \App\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create(
|
||||
[
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
47
app/Http/Controllers/Admin/Auth/ResetPasswordController.php
Normal file
47
app/Http/Controllers/Admin/Auth/ResetPasswordController.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
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.
|
||||
|
|
||||
*/
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users after resetting their password.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
public function showResetForm(Request $request, $token = null)
|
||||
{
|
||||
$data['token'] = $token;
|
||||
$data['email'] = $request->email;
|
||||
return view('auth.passwords.reset', $data);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Auth;
|
||||
namespace App\Http\Controllers\Admin\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\VerifiesEmails;
|
||||
@@ -25,7 +25,7 @@ class VerificationController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/';
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
@@ -20,12 +20,6 @@ class OrderController extends Controller
|
||||
return view('Admin.Shop.Orders.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Orders::store($request->all());
|
||||
return redirect()->route('Admin.Shop.Orders.index');
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data = Orders::get($id);
|
||||
@@ -34,14 +28,20 @@ class OrderController extends Controller
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['order'] = Orders::get($id, ['customer', 'detail'])->toArray();
|
||||
dump($data['order']);
|
||||
exit;
|
||||
$data['order'] = Orders::edit($id)->toArray();
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Admin.Shop.Orders.edit', $data);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
$ret = Orders::store($request->all());
|
||||
return redirect()->route('Admin.Shop.Orders.index');
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
return Orders::destroy($id);
|
||||
return Orders::delete($id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,36 +3,27 @@
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
|
||||
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.
|
||||
|
|
||||
*/
|
||||
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
protected function guard()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
|
||||
public function broker()
|
||||
{
|
||||
return Password::broker('customers');
|
||||
}
|
||||
|
||||
public function showLinkRequestForm()
|
||||
{
|
||||
$data = \App\Repositories\Config::init();
|
||||
return view('auth.passwords.email', $data);
|
||||
return view('Shop.auth.passwords.email');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,26 +10,48 @@ use Illuminate\Http\Request;
|
||||
class LoginController extends Controller
|
||||
{
|
||||
use AuthenticatesUsers;
|
||||
|
||||
protected $redirectTo = '/';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest')->except('logout');
|
||||
$this->middleware('guest:web')->except('logout');
|
||||
// $this->middleware('guest')->except('logout');
|
||||
}
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
|
||||
public function showLoginForm()
|
||||
{
|
||||
return view('auth.login', $data ?? []);
|
||||
return view('Shop.auth.login');
|
||||
}
|
||||
|
||||
public function authenticated(Request $request, $user)
|
||||
public function login(Request $request)
|
||||
{
|
||||
return redirect()->intended($this->redirectPath());
|
||||
$credentials = $request->validate([
|
||||
'email' => 'required|email',
|
||||
'password' => 'required|min:8',
|
||||
]);
|
||||
|
||||
if ($this->guard()->attempt($credentials, $request->get('remember'))) {
|
||||
$request->session()->regenerate();
|
||||
return (back()->getTargetUrl() == route('Shop.login')) ? redirect()->intended(route('home')) : back();
|
||||
}
|
||||
return back()->withInput($request->only('email', 'remember'));
|
||||
}
|
||||
|
||||
public function logout(Request $request)
|
||||
{
|
||||
$sessionKey = $this->guard()->getName();
|
||||
$this->guard()->logout();
|
||||
$request->session()->forget($sessionKey);
|
||||
return redirect()->route('home');
|
||||
}
|
||||
|
||||
public function username()
|
||||
{
|
||||
return 'username';
|
||||
return 'email';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,75 +2,84 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Sebastienheyd\Boilerplate\Rules\Password;
|
||||
|
||||
use App\Models\Shop\Customer;
|
||||
|
||||
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.
|
||||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
protected function guard()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
|
||||
protected function redirectTo()
|
||||
{
|
||||
return route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a validator for an incoming registration request.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \Illuminate\Contracts\Validation\Validator
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make(
|
||||
$data, [
|
||||
'name' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
]
|
||||
);
|
||||
return Validator::make($data, [
|
||||
'last_name' => 'required|max:255',
|
||||
'first_name' => 'required|max:255',
|
||||
'email' => 'required|email|max:255|unique:shop_customers,email,NULL,id,deleted_at,NULL',
|
||||
'password' => ['required', 'confirmed', new Password()],
|
||||
]);
|
||||
}
|
||||
|
||||
public function showRegistrationForm()
|
||||
{
|
||||
return view('Shop.auth.register', $data ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user instance after a valid registration.
|
||||
*
|
||||
* @param array $data
|
||||
* @return \App\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create(
|
||||
[
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]
|
||||
);
|
||||
$user = Customer::withTrashed()->updateOrCreate(['email' => $data['email']], [
|
||||
'active' => true,
|
||||
'first_name' => $data['first_name'],
|
||||
'last_name' => $data['last_name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
]);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function emailVerify()
|
||||
{
|
||||
if (Auth::user()->hasVerifiedEmail()) {
|
||||
return redirect(route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard')));
|
||||
}
|
||||
|
||||
return view('boilerplate::auth.verify-email');
|
||||
}
|
||||
|
||||
public function emailVerifyRequest(EmailVerificationRequest $request)
|
||||
{
|
||||
$request->fulfill();
|
||||
return redirect(route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard')));
|
||||
}
|
||||
|
||||
public function emailSendVerification(Request $request)
|
||||
{
|
||||
$request->user()->sendEmailVerificationNotification();
|
||||
return back()->with('message', 'Verification link sent!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,37 +2,19 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use App\Rules\Password as PasswordRules;
|
||||
|
||||
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.
|
||||
|
|
||||
*/
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users after resetting their password.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = '/';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
@@ -40,8 +22,29 @@ class ResetPasswordController extends Controller
|
||||
|
||||
public function showResetForm(Request $request, $token = null)
|
||||
{
|
||||
$data['token'] = $token;
|
||||
$data['email'] = $request->email;
|
||||
return view('auth.passwords.reset', $data);
|
||||
$token = $request->route()->parameter('token');
|
||||
|
||||
return view('Shop.auth.passwords.reset')->with(
|
||||
['token' => $token, 'email' => $request->email]
|
||||
);
|
||||
}
|
||||
|
||||
protected function rules()
|
||||
{
|
||||
return [
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
'password' => ['required', 'confirmed', new PasswordRules()],
|
||||
];
|
||||
}
|
||||
|
||||
public function broker()
|
||||
{
|
||||
return Password::broker('customers');
|
||||
}
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class VerificationController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = '/';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
||||
@@ -9,7 +9,6 @@ use App\Repositories\Shop\Articles;
|
||||
|
||||
class ArticleController extends Controller
|
||||
{
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data['article'] = Articles::getArticleToSell($id);
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
|
||||
public function broker()
|
||||
{
|
||||
return Password::broker('customers');
|
||||
}
|
||||
|
||||
public function showLinkRequestForm()
|
||||
{
|
||||
return view('Shop.auth.passwords.email');
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
use AuthenticatesUsers;
|
||||
|
||||
protected $redirectTo = '/';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('guest')->except('logout');
|
||||
}
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
|
||||
public function showLoginForm()
|
||||
{
|
||||
return view('Shop.auth.login');
|
||||
}
|
||||
|
||||
public function login(Request $request)
|
||||
{
|
||||
$credentials = $request->validate([
|
||||
'email' => 'required|email',
|
||||
'password' => 'required|min:8',
|
||||
]);
|
||||
|
||||
if ($this->guard()->attempt($credentials, $request->get('remember'))) {
|
||||
$request->session()->regenerate();
|
||||
return (back()->getTargetUrl() == route('Shop.login')) ? redirect()->intended(route('home')) : back();
|
||||
}
|
||||
return back()->withInput($request->only('email', 'remember'));
|
||||
}
|
||||
|
||||
public function logout(Request $request)
|
||||
{
|
||||
$sessionKey = $this->guard()->getName();
|
||||
$this->guard()->logout();
|
||||
$request->session()->forget($sessionKey);
|
||||
return redirect()->route('home');
|
||||
}
|
||||
|
||||
public function username()
|
||||
{
|
||||
return 'email';
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Sebastienheyd\Boilerplate\Rules\Password;
|
||||
|
||||
use App\Models\Shop\Customer;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
use RegistersUsers;
|
||||
|
||||
protected $redirectTo;
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
|
||||
protected function redirectTo()
|
||||
{
|
||||
return route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard'));
|
||||
}
|
||||
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
'last_name' => 'required|max:255',
|
||||
'first_name' => 'required|max:255',
|
||||
'email' => 'required|email|max:255|unique:shop_customers,email,NULL,id,deleted_at,NULL',
|
||||
'password' => ['required', 'confirmed', new Password()],
|
||||
]);
|
||||
}
|
||||
|
||||
public function showRegistrationForm()
|
||||
{
|
||||
return view('Shop.auth.register', $data ?? []);
|
||||
}
|
||||
|
||||
protected function create(array $data)
|
||||
{
|
||||
$user = Customer::withTrashed()->updateOrCreate(['email' => $data['email']], [
|
||||
'active' => true,
|
||||
'first_name' => $data['first_name'],
|
||||
'last_name' => $data['last_name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
]);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function emailVerify()
|
||||
{
|
||||
if (Auth::user()->hasVerifiedEmail()) {
|
||||
return redirect(route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard')));
|
||||
}
|
||||
|
||||
return view('boilerplate::auth.verify-email');
|
||||
}
|
||||
|
||||
public function emailVerifyRequest(EmailVerificationRequest $request)
|
||||
{
|
||||
$request->fulfill();
|
||||
return redirect(route(config('boilerplate.app.redirectTo', 'boilerplate.dashboard')));
|
||||
}
|
||||
|
||||
public function emailSendVerification(Request $request)
|
||||
{
|
||||
$request->user()->sendEmailVerificationNotification();
|
||||
return back()->with('message', 'Verification link sent!');
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use App\Rules\Password as PasswordRules;
|
||||
|
||||
class ResetPasswordController extends Controller
|
||||
{
|
||||
use ResetsPasswords;
|
||||
|
||||
protected $redirectTo = '/';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
public function showResetForm(Request $request, $token = null)
|
||||
{
|
||||
$token = $request->route()->parameter('token');
|
||||
|
||||
return view('Shop.auth.passwords.reset')->with(
|
||||
['token' => $token, 'email' => $request->email]
|
||||
);
|
||||
}
|
||||
|
||||
protected function rules()
|
||||
{
|
||||
return [
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
'password' => ['required', 'confirmed', new PasswordRules()],
|
||||
];
|
||||
}
|
||||
|
||||
public function broker()
|
||||
{
|
||||
return Password::broker('customers');
|
||||
}
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('customer');
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ class CustomerController extends Controller
|
||||
{
|
||||
public function profile($id = false)
|
||||
{
|
||||
return view('Shop.Customers.profile');
|
||||
$data = Customers::editProfile($id);
|
||||
return view('Shop.Customers.profile', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ use App\Repositories\Core\User\ShopCart;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use App\Repositories\Shop\Deliveries;
|
||||
use App\Repositories\Shop\Orders;
|
||||
use App\Repositories\Shop\Paybox;
|
||||
use App\Repositories\Shop\Baskets;
|
||||
use App\Repositories\Shop\SaleChannels;
|
||||
|
||||
@@ -30,13 +31,13 @@ class OrderController extends Controller
|
||||
{
|
||||
$data = $request->all();
|
||||
$data['customer_id'] = Customers::getId();
|
||||
$data['basket'] = Baskets::getBasketSummary();
|
||||
dump($data);
|
||||
exit;
|
||||
$data['sale_channel_id'] = $data['sale_channel_id'] ?? SaleChannels::getDefaultID();
|
||||
$data['basket'] = Baskets::getBasketSummary($data['sale_channel_id']);
|
||||
$order = Orders::saveOrder($data);
|
||||
if ($order) {
|
||||
if ($data['payment'] == '1') {
|
||||
return redirect()->route('Shop.Payments.online');
|
||||
if ($data['payment_type'] == '1') {
|
||||
return Paybox::makeAuthorizationRequest($data['basket']['total_shipped']);
|
||||
// return redirect()->route('Shop.Payments.online');
|
||||
} else {
|
||||
return redirect()->route('Shop.Orders.confirmed');
|
||||
}
|
||||
@@ -47,6 +48,7 @@ class OrderController extends Controller
|
||||
|
||||
public function confirmed()
|
||||
{
|
||||
ShopCart::clear();
|
||||
return view('Shop.Orders.confirmed');
|
||||
}
|
||||
}
|
||||
|
||||
18
app/Http/Controllers/Shop/OrderPaymentController.php
Normal file
18
app/Http/Controllers/Shop/OrderPaymentController.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Core\User\ShopCart;
|
||||
use App\Repositories\Shop\Customers;
|
||||
use App\Repositories\Shop\Deliveries;
|
||||
use App\Repositories\Shop\Orders;
|
||||
use App\Repositories\Shop\Paybox;
|
||||
use App\Repositories\Shop\Baskets;
|
||||
use App\Repositories\Shop\SaleChannels;
|
||||
|
||||
class OrderPaymentController extends Controller
|
||||
{
|
||||
}
|
||||
36
app/Http/Controllers/Shop/PayboxController.php
Normal file
36
app/Http/Controllers/Shop/PayboxController.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
|
||||
class PayboxController extends Controller
|
||||
{
|
||||
public function accepted()
|
||||
{
|
||||
return view('paybox.accepted');
|
||||
}
|
||||
|
||||
public function refused()
|
||||
{
|
||||
return view('paybox.refused');
|
||||
}
|
||||
|
||||
public function aborted()
|
||||
{
|
||||
return view('paybox.aborted');
|
||||
}
|
||||
|
||||
public function waiting()
|
||||
{
|
||||
return view('paybox.waiting');
|
||||
}
|
||||
|
||||
public function process(Request $request)
|
||||
{
|
||||
dump($request);
|
||||
return view('paybox.send');
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ use Yadahan\AuthenticationLog\AuthenticationLogable;
|
||||
use App\Notifications\NewUser;
|
||||
use App\Notifications\ResetPassword;
|
||||
use App\Notifications\VerifyEmail;
|
||||
use App\Repositories\Core\DateTime;
|
||||
|
||||
class Customer extends Authenticatable
|
||||
{
|
||||
|
||||
@@ -579,4 +579,15 @@ class Articles
|
||||
{
|
||||
return self::update(['homepage' => $homepage], $id);
|
||||
}
|
||||
|
||||
public static function getNumericHash($id)
|
||||
{
|
||||
return hexdec(self::getHash($id));
|
||||
}
|
||||
|
||||
public static function getHash($id)
|
||||
{
|
||||
$name = self::get($id)->name ?? false;
|
||||
return $name ? hash('crc32c', Str::slug($name)) : false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,39 +16,44 @@ class Baskets
|
||||
return $data ? ShopCart::add($data, $update) : false;
|
||||
}
|
||||
|
||||
public static function getBasketSummary()
|
||||
public static function getBasketSummary($sale_channel_id = false)
|
||||
{
|
||||
$basket = ShopCart::getContent();
|
||||
$offers = Offer::with('variation')->whereIn('id', ShopCart::keys())->get();
|
||||
$total = 0;
|
||||
$total_taxed = 0;
|
||||
$shipping = 5;
|
||||
foreach ($basket as $item) {
|
||||
$offer = $offers->where('id', $item->id)->first();
|
||||
$prices = Offers::getPrice($item->id, $item->quantity, $sale_channel_id);
|
||||
$detail[] = [
|
||||
'id' => (int) $item->id,
|
||||
'offer_id' => (int) $item->id,
|
||||
'name' => $offer->article->name . ' (' . $offer->variation->name . ')',
|
||||
'quantity' => (int) $item->quantity,
|
||||
'price' => $item->price,
|
||||
'tax' => '',
|
||||
'price_taxed' => $item->price,
|
||||
'total' => self::getTotal($item->quantity, $item->price),
|
||||
'total_taxed' => self::getTotal($item->quantity, $item->price),
|
||||
'price' => (float) $prices->price,
|
||||
'tax' => $prices->price_taxed - $prices->price,
|
||||
'price_taxed' => (float) $prices->price_taxed,
|
||||
'total' => self::getTotal($item->quantity, $prices->price),
|
||||
'total_tax' => self::getTotal($item->quantity, $prices->price_taxed - $prices->price),
|
||||
'total_taxed' => self::getTotal($item->quantity, $prices->price_taxed),
|
||||
];
|
||||
$total += self::getTotal($item->quantity, $item->price);
|
||||
$total_taxed += self::getTotal($item->quantity, $item->price);
|
||||
$total += self::getTotal($item->quantity, $prices->price);
|
||||
$total_taxed += self::getTotal($item->quantity, $prices->price_taxed);
|
||||
}
|
||||
$data = [
|
||||
'detail' => $detail,
|
||||
'total' => $total,
|
||||
'taxes' => $total_taxed - $total,
|
||||
'total_taxed' => $total_taxed,
|
||||
'shipping' => $shipping,
|
||||
'total_shipped' => $total_taxed + $shipping,
|
||||
];
|
||||
return $data ?? false;
|
||||
}
|
||||
|
||||
public static function getTotal($quantity, $price)
|
||||
{
|
||||
return (int) $quantity * $price;
|
||||
return $quantity * $price;
|
||||
}
|
||||
|
||||
public static function getBasket($sale_channel_id = false)
|
||||
|
||||
@@ -4,9 +4,10 @@ namespace App\Repositories\Shop;
|
||||
|
||||
use Spatie\Stats\BaseStats;
|
||||
|
||||
class CustomerStats extends BaseStats {}
|
||||
class CustomerStats extends BaseStats
|
||||
{
|
||||
public function getName() : string{
|
||||
public function getName() : string
|
||||
{
|
||||
return 'customers';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,16 @@ use App\Models\Shop\Customer;
|
||||
|
||||
class Customers
|
||||
{
|
||||
public static function editProfile($id = false)
|
||||
{
|
||||
$id = $id ? $id : self::getId();
|
||||
$data = [
|
||||
'customer' => self::get($id, ['addresses', 'deliveries', 'orders'])->toArray(),
|
||||
'deliveries' => Deliveries::getAll('sale_channel')->toArray(),
|
||||
];
|
||||
dump($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function getAvatar($id = false)
|
||||
{
|
||||
|
||||
@@ -11,9 +11,10 @@ class Deliveries
|
||||
return Delivery::orderBy('name', 'asc')->get()->pluck('name', 'id')->toArray();
|
||||
}
|
||||
|
||||
public static function getAll()
|
||||
public static function getAll($relations = false)
|
||||
{
|
||||
return Delivery::orderBy('name', 'asc')->get();
|
||||
$model = $relations ? Delivery::with($relations) : Delivery::query();
|
||||
return $model->orderBy('name', 'asc')->get();
|
||||
}
|
||||
|
||||
public static function getAllWithSaleChannel()
|
||||
|
||||
@@ -4,9 +4,10 @@ namespace App\Repositories\Shop;
|
||||
|
||||
use Spatie\Stats\BaseStats;
|
||||
|
||||
class InvoiceStats extends BaseStats {}
|
||||
class InvoiceStats extends BaseStats
|
||||
{
|
||||
public function getName() : string{
|
||||
public function getName() : string
|
||||
{
|
||||
return 'invoices';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,9 @@ use App\Models\Shop\Invoice;
|
||||
|
||||
class Invoices
|
||||
{
|
||||
|
||||
public static function saveInvoice($order_id, $data)
|
||||
{
|
||||
$data['order_id'] = $order_id;
|
||||
dump($data);
|
||||
exit;
|
||||
return self::store($data);
|
||||
}
|
||||
|
||||
@@ -29,6 +26,7 @@ class Invoices
|
||||
|
||||
public static function create($data)
|
||||
{
|
||||
InvoiceStats::increase($data['total_taxed']);
|
||||
$data['uuid'] = Str::uuid()->toString();
|
||||
$data['ref'] = self::getNewRef();
|
||||
return Invoice::create($data);
|
||||
@@ -44,6 +42,8 @@ class Invoices
|
||||
|
||||
public static function delete($id)
|
||||
{
|
||||
$invoice = self::get($id);
|
||||
InvoiceStats::decrease($invoice->total_priced);
|
||||
return Invoice::destroy($id);
|
||||
}
|
||||
|
||||
@@ -51,6 +51,6 @@ class Invoices
|
||||
{
|
||||
$ref = date('ym') . '00000';
|
||||
$last_ref = Invoice::orderBy('ref', 'desc')->where('ref', '>', $ref)->first();
|
||||
return $last_ref ? $last_ref + 1 : $ref + 1;
|
||||
return $last_ref ? $last_ref->ref + 1 : $ref + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,8 @@ class OrderDetails
|
||||
public static function saveBasket($order_id, $data)
|
||||
{
|
||||
foreach ($data as $item) {
|
||||
$detail = self::store([
|
||||
'order_id' => $order_id,
|
||||
'offer_id' => $item['id'],
|
||||
'quantity' => $item['quantity'],
|
||||
'price_taxed' => $item['price'],
|
||||
]);
|
||||
$item['order_id'] = $order_id;
|
||||
$detail = self::store($item);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
13
app/Repositories/Shop/OrderStats.php
Normal file
13
app/Repositories/Shop/OrderStats.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use Spatie\Stats\BaseStats;
|
||||
|
||||
class OrderStats extends BaseStats
|
||||
{
|
||||
public function getName() : string
|
||||
{
|
||||
return 'orders';
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,24 @@ class Orders
|
||||
|
||||
public static function saveOrder($data)
|
||||
{
|
||||
$data += $data['basket'];
|
||||
$basket = $data['basket'];
|
||||
unset($data['basket']);
|
||||
dump($data);
|
||||
exit;
|
||||
$order = self::store($data);
|
||||
$invoice = Invoices::saveInvoice($order->id, $data);
|
||||
return $order ? OrderDetails::saveBasket($order->id, $basket) : false;
|
||||
$detail = OrderDetails::saveBasket($order->id, $basket['detail']);
|
||||
unset($data['comment']);
|
||||
unset($data['agree']);
|
||||
unset($data['customer_id']);
|
||||
unset($data['delivery_id']);
|
||||
unset($data['detail']);
|
||||
unset($data['payment_type']);
|
||||
unset($data['sale_channel_id']);
|
||||
return ($order && $detail) ? Invoices::saveInvoice($order->id, $data) : false;
|
||||
}
|
||||
|
||||
public static function edit($id)
|
||||
{
|
||||
return Orders::get($id, ['customer', 'address', 'delivery', 'detail']);
|
||||
}
|
||||
|
||||
public static function get($id, $relations = false)
|
||||
@@ -30,6 +41,7 @@ class Orders
|
||||
|
||||
public static function create($data)
|
||||
{
|
||||
OrderStats::increase();
|
||||
return Order::create($data);
|
||||
}
|
||||
|
||||
|
||||
53
app/Repositories/Shop/Paybox.php
Normal file
53
app/Repositories/Shop/Paybox.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App;
|
||||
|
||||
use Devpark\PayboxGateway\Requests\AuthorizationWithCapture;
|
||||
use Devpark\PayboxGateway\Responses\Verify;
|
||||
use Devpark\PayboxGateway\Requests\Capture;
|
||||
|
||||
class Paybox
|
||||
{
|
||||
|
||||
public static function makeAuthorizationRequest($amount, $customer_email = 'test@example.com')
|
||||
{
|
||||
$authorizationRequest = App::make(AuthorizationWithCapture::class);
|
||||
|
||||
return $authorizationRequest->setAmount($amount)->setCustomerEmail($customer_email)
|
||||
->setPaymentNumber(1)->send('paybox.send');
|
||||
}
|
||||
|
||||
public static function verifyPayment($invoice_id)
|
||||
{
|
||||
$invoice = Invoices::get($invoice_id);
|
||||
$payboxVerify = App::make(Verify::class);
|
||||
try {
|
||||
$success = $payboxVerify->isSuccess($invoice->total_shipped);
|
||||
if ($success) {
|
||||
// process order here after making sure it was real payment
|
||||
}
|
||||
echo "OK";
|
||||
}
|
||||
catch (InvalidSignature $e) {
|
||||
Log::alert('Invalid payment signature detected');
|
||||
}
|
||||
}
|
||||
|
||||
public static function getPreviousAuthorizedRequest()
|
||||
{
|
||||
$payment = PaymentModel::find($idOfAuthorizedPayment);
|
||||
$captureRequest = App::make(Capture::class);
|
||||
$response = $captureRequest->setAmount($payment->amount)
|
||||
->setPayboxCallNumber($payment->call_number)
|
||||
->setPayboxTransactionNumber($payment->transaction_number)
|
||||
->setDayRequestNumber(2)
|
||||
->send();
|
||||
|
||||
if ($response->isSuccess()) {
|
||||
// process order here
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
"arcanedev/log-viewer": "^8.1",
|
||||
"arrilot/laravel-widgets": "^3.13",
|
||||
"awobaz/compoships": "^2.1",
|
||||
"balping/laravel-hashslug": "^2.2",
|
||||
"barryvdh/laravel-dompdf": "^0.9",
|
||||
"barryvdh/laravel-snappy": "^0.4.7",
|
||||
"box/spout": "^3.3",
|
||||
@@ -21,7 +22,6 @@
|
||||
"cesargb/laravel-cascade-delete": "^1.2",
|
||||
"coduo/php-humanizer": "^4.0",
|
||||
"composer/composer": "^2.0.13",
|
||||
"consoletvs/charts": "^7.2",
|
||||
"cornford/googlmapper": "^3.3",
|
||||
"darryldecode/cart": "^4.1",
|
||||
"datatables/datatables": "^1.10",
|
||||
@@ -63,6 +63,7 @@
|
||||
"mpdf/mpdf": "^8.0",
|
||||
"mpociot/teamwork": "^6.1",
|
||||
"nicmart/tree": "^0.3",
|
||||
"nicolaslopezj/searchable": "^1.13",
|
||||
"orangehill/iseed": "^3.0",
|
||||
"php-console/php-console": "^3.1",
|
||||
"proengsoft/laravel-jsvalidation": "^4.5",
|
||||
@@ -84,6 +85,7 @@
|
||||
"spatie/image-optimizer": "^1.4",
|
||||
"spatie/laravel-activitylog": "^3.6",
|
||||
"spatie/laravel-backup": "^7.0",
|
||||
"spatie/laravel-collection-macros": "^7.12",
|
||||
"spatie/laravel-cookie-consent": "^3.2",
|
||||
"spatie/laravel-mail-preview": "^4.0",
|
||||
"spatie/laravel-medialibrary": "^9.6",
|
||||
|
||||
@@ -166,6 +166,7 @@ return [
|
||||
* Package Service Providers...
|
||||
*/
|
||||
Darryldecode\Cart\CartServiceProvider::class,
|
||||
Devpark\PayboxGateway\Providers\PayboxServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
|
||||
@@ -8,10 +8,14 @@ return [
|
||||
'domain' => '',
|
||||
|
||||
// Redirect to this route after login
|
||||
'redirectTo' => 'home',
|
||||
'redirectTo' => 'Admin.home',
|
||||
|
||||
// Backend locale
|
||||
'locale' => config('app.locale'),
|
||||
|
||||
'logs' => true,
|
||||
|
||||
// When set to true, allows admins to view the site as a user of their choice
|
||||
'allowImpersonate' => false,
|
||||
|
||||
];
|
||||
|
||||
@@ -12,6 +12,6 @@ return [
|
||||
],
|
||||
'throttle' => [
|
||||
'maxAttempts' => 3, // Maximum number of login attempts to allow
|
||||
'decayMinutes' => 1, // Number of minutes to wait before login will be available again
|
||||
'decayMinutes' => 5, // Number of minutes to wait before login will be available again
|
||||
],
|
||||
];
|
||||
|
||||
118
config/paybox.php
Normal file
118
config/paybox.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* Whether test environment is enabled
|
||||
*/
|
||||
'test' => env('PAYBOX_TEST', false),
|
||||
|
||||
/*
|
||||
* Site number (provided by Paybox)
|
||||
*/
|
||||
'site' => env('PAYBOX_SITE', ''),
|
||||
|
||||
/*
|
||||
* Rank number (provided by Paybox)
|
||||
*/
|
||||
'rank' => env('PAYBOX_RANK', ''),
|
||||
|
||||
/*
|
||||
* Internal identifier (provided by Paybox)
|
||||
*/
|
||||
'id' => env('PAYBOX_ID', ''),
|
||||
|
||||
/*
|
||||
* Password for Paybox back-office (It's required for Paybox direct - when you use
|
||||
* capturing, otherwise it won't be used)
|
||||
*/
|
||||
'back_office_password' => env('PAYBOX_BACK_OFFICE_PASSWORD', ''),
|
||||
|
||||
/*
|
||||
* HMAC authentication key - it should be generated in Paybox merchant panel
|
||||
*/
|
||||
'hmac_key' => env('PAYBOX_HMAC_KEY', ''),
|
||||
|
||||
/*
|
||||
* Paybox public key location - you can get it from
|
||||
* http://www1.paybox.com/wp-content/uploads/2014/03/pubkey.pem
|
||||
*/
|
||||
'public_key' => storage_path('paybox/pubkey.pem'),
|
||||
|
||||
/*
|
||||
* Default return fields when going back from Paybox. You can change here keys as you want,
|
||||
* you can add also more values from ResponseField class
|
||||
*/
|
||||
'return_fields' => [
|
||||
'amount' => \Devpark\PayboxGateway\ResponseField::AMOUNT,
|
||||
'authorization_number' => \Devpark\PayboxGateway\ResponseField::AUTHORIZATION_NUMBER,
|
||||
'order_number' => \Devpark\PayboxGateway\ResponseField::ORDER_NUMBER,
|
||||
'response_code' => \Devpark\PayboxGateway\ResponseField::RESPONSE_CODE,
|
||||
'payment_type' => \Devpark\PayboxGateway\ResponseField::PAYMENT_TYPE,
|
||||
'call_number' => \Devpark\PayboxGateway\ResponseField::PAYBOX_CALL_NUMBER,
|
||||
'transaction_number' => \Devpark\PayboxGateway\ResponseField::TRANSACTION_NUMBER,
|
||||
// signature should be always last return field
|
||||
'signature' => \Devpark\PayboxGateway\ResponseField::SIGNATURE,
|
||||
],
|
||||
|
||||
/*
|
||||
* Those are routes names (not urls) where customer will be redirected after payment. If you
|
||||
* want to use custom route with params in url you should set them dynamically when creating
|
||||
* authorization data. You shouldn't change keys here. Those urls will be later launched using
|
||||
* GET HTTP request
|
||||
*/
|
||||
'customer_return_routes_names' => [
|
||||
'accepted' => 'paybox.accepted',
|
||||
'refused' => 'paybox.refused',
|
||||
'aborted' => 'paybox.aborted',
|
||||
'waiting' => 'paybox.waiting',
|
||||
],
|
||||
|
||||
/*
|
||||
* This is route name (not url) where Paybox will send transaction status. This url is
|
||||
* independent from customer urls and it's the only url that should be used to track current
|
||||
* payment status for real. If you want to use custom route with params in url you should set it
|
||||
* dynamically when creating authorization data. This url will be later launched using GET HTTP
|
||||
* request
|
||||
*/
|
||||
'transaction_verify_route_name' => 'paybox.process',
|
||||
|
||||
/*
|
||||
* Access urls for Paybox for production environment
|
||||
*/
|
||||
'production_urls' => [
|
||||
/*
|
||||
* Paybox System urls
|
||||
*/
|
||||
'paybox' => [
|
||||
'https://tpeweb.e-transactions.fr/cgi/MYchoix_pagepaiement.cgi',
|
||||
'https://tpeweb1.e-transactions.fr/cgi/MYchoix_pagepaiement.cgi',
|
||||
],
|
||||
|
||||
/*
|
||||
* Paybox Direct urls
|
||||
*/
|
||||
'paybox_direct' => [
|
||||
'https://ppps.e-transactions.fr/PPPS.php',
|
||||
'https://ppps1.e-transactions.fr/PPPS.php',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* Access urls for Paybox for test environment
|
||||
*/
|
||||
'test_urls' => [
|
||||
/*
|
||||
* Paybox System urls
|
||||
*/
|
||||
'paybox' => [
|
||||
'https://preprod-tpeweb.e-transactions.fr/cgi/MYchoix_pagepaiement.cgi',
|
||||
],
|
||||
|
||||
/*
|
||||
* Paybox Direct urls
|
||||
*/
|
||||
'paybox_direct' => [
|
||||
'https://preprod-ppps.e-transactions.fr/PPPS.php',
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -5,45 +5,48 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Shop.Orders.update', 'id' => 'order-form', 'autocomplete' => 'off']) }}
|
||||
<input type="hidden" name="id" value="{{ $id }}">
|
||||
<input type="hidden" name="id" value="{{ $order['id'] ?? null }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ $order['last_name'] }} {{ $order['first_name'] }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ $order['delivery']['name'] }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ $order['address'] }}<br/>
|
||||
{{ $order['address2'] }}<br/>
|
||||
{{ $order['zipcode'] }} {{ $order['city'] }}<br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-card title="Détail de a commande">
|
||||
<x-card>
|
||||
<h3>{{ $order['customer']['last_name'] }} {{ $order['customer']['first_name'] }}</h3>
|
||||
|
||||
<h4>{{ $order['delivery']['name'] }} </h4>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="datatable">
|
||||
@foreach ($order['details'] as $detail)
|
||||
<tr>
|
||||
<td>{{ $detail['quantity'] }}</td>
|
||||
<td>{{ $detail['name'] }}</td>
|
||||
<td>{{ $detail['price'] }}</td>
|
||||
<td>{{ $detail['total'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@if ($order['address'])
|
||||
{{ $order['address']['address'] }}<br/>
|
||||
@isset ($order['address']['address2']) {{ $order['address']['address2'] }}<br/> @endisset
|
||||
{{ $order['address']['zipcode'] }} {{ $order['address']['city'] }}<br/>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<x-card title="Détail de la commande">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<table class="datatable w-100 table-bordered">
|
||||
<thead>
|
||||
<th>Quantité</th>
|
||||
<th>Nom</th>
|
||||
<th>Prix</th>
|
||||
<th>Total</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($order['detail'] as $detail)
|
||||
<tr>
|
||||
<td>{{ $detail['quantity'] }}</td>
|
||||
<td>{{ $detail['name'] }}</td>
|
||||
<td>{{ $detail['price'] }}</td>
|
||||
<td>{{ $detail['total'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</x-card>
|
||||
</x-card>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -11,13 +11,6 @@
|
||||
@stack('css')
|
||||
</head>
|
||||
<body class="{{ $bodyClass ?? 'login-page'}}">
|
||||
|
||||
<div class="row" style="width: 380px;">
|
||||
<div class="col-12 text-center">
|
||||
<img src="/img/logo.png" height="128">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@yield('content')
|
||||
<script src="{{ mix('/boilerplate.min.js', '/assets/vendor/boilerplate') }}"></script>
|
||||
@stack('js')
|
||||
14
resources/views/Admin/auth/login.blade.php
Normal file
14
resources/views/Admin/auth/login.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@extends('auth.layout', [
|
||||
'title' => __('boilerplate::auth.login.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="row" style="width: 380px;">
|
||||
<div class="col-12 text-center">
|
||||
<img src="/img/logo.png" height="128">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Admin.auth.partials.login')
|
||||
@endsection
|
||||
@@ -1,42 +1,35 @@
|
||||
{!! Form::open(['route' => 'Shop.login.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::open(['route' => 'boilerplate.login', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
|
||||
<div class="form-group has-feedback">
|
||||
<div class="input-group form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary">
|
||||
<i class="fa fa-at"></i>
|
||||
</button>
|
||||
</div>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<div class="input-group form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password')]) }}
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary">
|
||||
<i class="fa fa-lock"></i>
|
||||
</button>
|
||||
</div>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
{!! $errors->first('password','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 mbs">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ __('Se connecter') }}</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-6">
|
||||
<a href="{{ route('Shop.password.request') }}">{{ __('Mot de passe oublié ?') }}</a><br>
|
||||
<!--
|
||||
<div class="col-12 col-lg-8">
|
||||
<div class="checkbox icheck">
|
||||
<label style="padding-left: 0">
|
||||
<input type="checkbox" name="remember" class="icheck" {{ old('remember') ? 'checked' : '' }}>
|
||||
{{ __('boilerplate::auth.login.rememberme') }}
|
||||
</label>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 mbs">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ __('boilerplate::auth.login.signin') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<a href="{{ route('boilerplate.password.request') }}">{{ __('boilerplate::auth.login.forgotpassword') }}</a><br>
|
||||
@if(config('boilerplate.auth.register'))
|
||||
<a href="{{ route('boilerplate.register') }}" class="text-center">{{ __('boilerplate::auth.login.register') }}</a>
|
||||
@endif
|
||||
28
resources/views/Admin/auth/passwords/email.blade.php
Normal file
28
resources/views/Admin/auth/passwords/email.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::auth.password.title'), 'bodyClass' => 'hold-transition login-page'])
|
||||
|
||||
@section('content')
|
||||
@component('boilerplate::auth.loginbox')
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.password.intro') }}</p>
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
{!! Form::open(['route' => 'boilerplate.password.email', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::auth.password.submit') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<a href="{{ route('boilerplate.login') }}">{{ __('boilerplate::auth.password.login_link') }}</a><br>
|
||||
@endcomponent
|
||||
@endsection
|
||||
@@ -1,12 +1,9 @@
|
||||
@extends('Shop.auth.layout', [
|
||||
'title' => __('boilerplate::auth.password_reset.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::auth.password_reset.title')])
|
||||
|
||||
@section('content')
|
||||
@component('boilerplate::auth.loginbox')
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.password_reset.intro') }}</p>
|
||||
{!! Form::open(['route' => 'Shop.password.update', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::open(['route' => 'Shop.password.reset.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::hidden('token', $token) !!}
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email', $email), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
39
resources/views/Admin/auth/register.blade.php
Normal file
39
resources/views/Admin/auth/register.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::auth.register.title'), 'bodyClass' => 'hold-transition login-page'])
|
||||
|
||||
@section('content')
|
||||
@component('boilerplate::auth.loginbox')
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.register.intro') }}</p>
|
||||
{!! Form::open(['route' => 'boilerplate.register', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{{ Form::text('first_name', old('first_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.first_name'), 'required', 'autofocus']) }}
|
||||
{!! $errors->first('first_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{{ Form::text('last_name', old('last_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.last_name'), 'required']) }}
|
||||
{!! $errors->first('last_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password'), 'required']) }}
|
||||
{!! $errors->first('password','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">
|
||||
{{ Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password_confirm'), 'required']) }}
|
||||
{!! $errors->first('password_confirmation','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="row mbm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::auth.register.register_button') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@if(!$firstUser)
|
||||
<a href="{{ route('boilerplate.login') }}">{{ __('boilerplate::auth.register.login_link') }}</a><br>
|
||||
@endif
|
||||
@endcomponent
|
||||
@endsection
|
||||
@@ -49,9 +49,7 @@
|
||||
$('.basket-quantity').change(function() {
|
||||
var offer_id = $(this).data('id');
|
||||
var quantity = $(this).val();
|
||||
var $row = $(this).parents('.row');
|
||||
console.log("add basket");
|
||||
console.log(quantity);
|
||||
var $row = $(this).closest('.row');
|
||||
updateBasket(offer_id, quantity, function() {
|
||||
calculatePrice($row);
|
||||
calculateTotal();
|
||||
@@ -73,8 +71,6 @@
|
||||
}
|
||||
|
||||
function calculatePrice($that) {
|
||||
console.log('calculatePrice');
|
||||
console.log($that);
|
||||
var quantity = $that.find('.basket-quantity').val();
|
||||
var price = $that.find('.basket-price').text();
|
||||
var total_price = fixNumber(quantity * price);
|
||||
|
||||
15
resources/views/Shop/Customers/partials/deliveries.blade.php
Normal file
15
resources/views/Shop/Customers/partials/deliveries.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@foreach ($deliveries as $delivery)
|
||||
<div class="row mt-3 mb-3">
|
||||
<div class="col-1">
|
||||
@include('components.form.radios.icheck', [
|
||||
'name' => 'delivery_id',
|
||||
'value' => $delivery['id'],
|
||||
'checked' => $customer['sale_delivery_id'] ?? false,
|
||||
])
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<strong>{{ $delivery['name'] }} - {{ $delivery['sale_channel']['name'] }}</strong><br/>
|
||||
<p>{{ $delivery['description'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
20
resources/views/Shop/Customers/partials/invoices.blade.php
Normal file
20
resources/views/Shop/Customers/partials/invoices.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="mt-3">
|
||||
@if ($customer['orders'] ?? false)
|
||||
@foreach ($customer['orders'] as $order)
|
||||
<div class="row mb-3">
|
||||
<div class="col-1">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
Numero facture
|
||||
</div>
|
||||
<div class="col-4">
|
||||
Date facture
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<a href="">Imprimer</a>
|
||||
<a href="">Télécharger</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
19
resources/views/Shop/Customers/partials/sale.blade.php
Normal file
19
resources/views/Shop/Customers/partials/sale.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<nav>
|
||||
<div class="nav nav-tabs pl-2">
|
||||
<a href="#deliveries" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="deliveries" aria-selected="true">
|
||||
MON MODE D'ACHAT
|
||||
</a>
|
||||
<a href="#invoices" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="invoices" aria-selected="false">
|
||||
FACTURES ET SUIVI DE COMMANDES
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active pt-0 pb-0 pl-2 pr-2" id="deliveries">
|
||||
@include('Shop.Customers.partials.deliveries')
|
||||
</div>
|
||||
<div class="tab-pane fade show pt-0 pb-0 pl-2 pr-2" id="invoices">
|
||||
@include('Shop.Customers.partials.invoices')
|
||||
</div>
|
||||
</div>
|
||||
10
resources/views/Shop/Customers/partials/user.blade.php
Normal file
10
resources/views/Shop/Customers/partials/user.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<hr>
|
||||
<strong>Mes coordonnées</strong><br>
|
||||
|
||||
<i class="fa fa-home pr-2"></i> {{ $customer['address'] }}<br>
|
||||
<i class="pr-5"></i> {{ $customer['address2'] }}<br>
|
||||
|
||||
<i class="fa fa-phone pr-2"></i> {{ $customer['phone'] }}<br>
|
||||
<i class="fa fa-envelope pr-2"></i> {{ $customer['email'] }}<br>
|
||||
<hr>
|
||||
<strong>Compte créé le {{ $customer['created_at'] }}</strong>
|
||||
@@ -3,5 +3,11 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
Profil
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
@include('Shop.Customers.partials.user')
|
||||
</div>
|
||||
<div class="col-9">
|
||||
@include('Shop.Customers.partials.sale')
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,13 +1,33 @@
|
||||
<div class="row">
|
||||
<div class="col-12 text-right">
|
||||
@if ($display_by_rows ?? false)
|
||||
@include('components.form.button', ['id' => 'by_cards', 'icon' => 'fa-th', 'class' => 'btn-secondary'])
|
||||
@include('components.form.button', [
|
||||
'id' => 'by_cards',
|
||||
'icon' => 'fa-th',
|
||||
'class' => 'btn-secondary',
|
||||
'title' => 'Vue par vignettes',
|
||||
])
|
||||
@else
|
||||
@include('components.form.button', ['id' => 'by_rows', 'icon' => 'fa-list', 'class' => 'btn-secondary'])
|
||||
@include('components.form.button', [
|
||||
'id' => 'by_rows',
|
||||
'icon' => 'fa-list',
|
||||
'class' => 'btn-secondary',
|
||||
'title' => 'Vue par lignes',
|
||||
])
|
||||
@endif
|
||||
|
||||
@include('components.form.button', ['data_id' => 'botanic', 'icon' => 'fa-leaf', 'class' => 'products bg-yellow yellow-dark'])
|
||||
@include('components.form.button', ['data_id' => 'merchandise', 'icon' => 'fa-seedling', 'class' => 'products bg-green text-white'])
|
||||
@include('components.form.button', [
|
||||
'data_id' => 'botanic',
|
||||
'icon' => 'fa-leaf',
|
||||
'class' => 'products bg-yellow yellow-dark',
|
||||
'title' => 'Par semences',
|
||||
])
|
||||
@include('components.form.button', [
|
||||
'data_id' => 'merchandise',
|
||||
'icon' => 'fa-seedling',
|
||||
'class' => 'products bg-green text-white',
|
||||
'title' => 'Par plants',
|
||||
])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
@else
|
||||
@include('Shop.Shelves.partials.category_articles')
|
||||
@endif
|
||||
</form>
|
||||
{{ Form::close() }}
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
@extends('Shop.auth.layout', [
|
||||
'title' => __('boilerplate::auth.login.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('Shop.auth.partials.login')
|
||||
|
||||
<p class="mt-3">
|
||||
Vous n'avez pas encore de compte ?
|
||||
<a href="{{ route('Shop.register') }}" class="text-center">{{ __('Inscrivez-vous') }}</a>
|
||||
</p>
|
||||
@endsection
|
||||
@@ -1,13 +0,0 @@
|
||||
@extends('Shop.auth.layout', ['title' => __('boilerplate::auth.password.title'), 'bodyClass' => 'hold-transition login-page'])
|
||||
|
||||
@section('content')
|
||||
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.password.intro') }}</p>
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('Shop.auth.partials.lost_password')
|
||||
@endsection
|
||||
@@ -1,8 +0,0 @@
|
||||
@extends('Shop.layout.layout', [
|
||||
'title' => __('home.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@include('Shop.auth.partials.register')
|
||||
@endsection
|
||||
@@ -20,19 +20,19 @@
|
||||
Déconnexion
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('Shop.logout') }}" method="POST" style="display: none;">
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
</li>
|
||||
@else
|
||||
<li class="dropdown-item">
|
||||
<a href="{{ route('Shop.login') }}" title="Identifiez-vous" rel="nofollow">
|
||||
<a href="{{ route('login') }}" title="Identifiez-vous" rel="nofollow">
|
||||
<span>Connexion</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown-item">
|
||||
<a href="{{ route('Shop.register') }}" title="Enregistrez-vous" rel="nofollow">
|
||||
<a href="{{ route('register') }}" title="Enregistrez-vous" rel="nofollow">
|
||||
<span>Creer votre compte</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
@stack('css')
|
||||
</head>
|
||||
<body class="{{ $bodyClass ?? 'login-page'}}">
|
||||
|
||||
<div class="row" style="width: 380px;">
|
||||
<div class="col-12 text-center">
|
||||
<img src="/img/logo.png" height="128">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@yield('content')
|
||||
<script src="{{ mix('/boilerplate.min.js', '/assets/vendor/boilerplate') }}"></script>
|
||||
@stack('js')
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@extends('auth.layout', [
|
||||
@extends('Shop.auth.layout', [
|
||||
'title' => __('boilerplate::auth.login.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
|
||||
@section('content')
|
||||
<div class="row" style="width: 380px;">
|
||||
<div class="col-12 text-center">
|
||||
<img src="/img/logo.png" height="128">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('auth.partials.login')
|
||||
|
||||
<p class="mt-3">
|
||||
Vous n'avez pas encore de compte ?
|
||||
<a href="{{ route('register') }}" class="text-center">{{ __('Inscrivez-vous') }}</a>
|
||||
</p>
|
||||
@endsection
|
||||
|
||||
@@ -1,35 +1,42 @@
|
||||
{!! Form::open(['route' => 'boilerplate.login', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::open(['route' => 'login.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
|
||||
<div class="form-group has-feedback">
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<div class="input-group form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary">
|
||||
<i class="fa fa-at"></i>
|
||||
</button>
|
||||
</div>
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
<div class="input-group form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password')]) }}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary">
|
||||
<i class="fa fa-lock"></i>
|
||||
</button>
|
||||
</div>
|
||||
{!! $errors->first('password','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8">
|
||||
<div class="col-12 col-lg-6 mbs">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ __('Se connecter') }}</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-6">
|
||||
<a href="{{ route('password.request') }}">{{ __('Mot de passe oublié ?') }}</a><br>
|
||||
<!--
|
||||
<div class="checkbox icheck">
|
||||
<label style="padding-left: 0">
|
||||
<input type="checkbox" name="remember" class="icheck" {{ old('remember') ? 'checked' : '' }}>
|
||||
{{ __('boilerplate::auth.login.rememberme') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 mbs">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ __('boilerplate::auth.login.signin') }}</button>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<a href="{{ route('boilerplate.password.request') }}">{{ __('boilerplate::auth.login.forgotpassword') }}</a><br>
|
||||
@if(config('boilerplate.auth.register'))
|
||||
<a href="{{ route('boilerplate.register') }}" class="text-center">{{ __('boilerplate::auth.login.register') }}</a>
|
||||
@endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{!! Form::open(['route' => 'Shop.password.email', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::open(['route' => 'password.email', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
@@ -13,4 +13,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<a href="{{ route('Shop.login') }}">{{ __('boilerplate::auth.password.login_link') }}</a><br>
|
||||
<a href="{{ route('login') }}">{{ __('boilerplate::auth.password.login_link') }}</a><br>
|
||||
@@ -1,4 +1,4 @@
|
||||
{!! Form::open(['route' => 'Shop.register.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::open(['route' => 'register.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<x-card title='Créez votre compte' class='mt-3 mb-3'>
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group {{ $errors->has('address2') ? 'has-error' : '' }}">
|
||||
{{ Form::text('address2', old('address2'), ['class' => 'form-control', 'placeholder' => __('Complément d\'adresse'), 'required']) }}
|
||||
{{ Form::text('address2', old('address2'), ['class' => 'form-control', 'placeholder' => __('Complément d\'adresse')]) }}
|
||||
{!! $errors->first('address2','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,28 +1,13 @@
|
||||
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::auth.password.title'), 'bodyClass' => 'hold-transition login-page'])
|
||||
@extends('Shop.auth.layout', ['title' => __('boilerplate::auth.password.title'), 'bodyClass' => 'hold-transition login-page'])
|
||||
|
||||
@section('content')
|
||||
@component('boilerplate::auth.loginbox')
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.password.intro') }}</p>
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
{!! Form::open(['route' => 'boilerplate.password.email', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::auth.password.submit') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<a href="{{ route('boilerplate.login') }}">{{ __('boilerplate::auth.password.login_link') }}</a><br>
|
||||
@endcomponent
|
||||
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.password.intro') }}</p>
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('Shop.auth.partials.lost_password')
|
||||
@endsection
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::auth.password_reset.title')])
|
||||
@extends('Shop.auth.layout', [
|
||||
'title' => __('boilerplate::auth.password_reset.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('boilerplate::auth.loginbox')
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.password_reset.intro') }}</p>
|
||||
{!! Form::open(['route' => 'Shop.password.reset.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::open(['route' => 'Shop.password.update', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
{!! Form::hidden('token', $token) !!}
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email', $email), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||
|
||||
@@ -1,39 +1,8 @@
|
||||
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::auth.register.title'), 'bodyClass' => 'hold-transition login-page'])
|
||||
@extends('Shop.layout.layout', [
|
||||
'title' => __('home.title'),
|
||||
'bodyClass' => 'hold-transition login-page'
|
||||
])
|
||||
|
||||
@section('content')
|
||||
@component('boilerplate::auth.loginbox')
|
||||
<p class="login-box-msg">{{ __('boilerplate::auth.register.intro') }}</p>
|
||||
{!! Form::open(['route' => 'boilerplate.register', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{{ Form::text('first_name', old('first_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.first_name'), 'required', 'autofocus']) }}
|
||||
{!! $errors->first('first_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{{ Form::text('last_name', old('last_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.last_name'), 'required']) }}
|
||||
{!! $errors->first('last_name','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required']) }}
|
||||
{!! $errors->first('email','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password'), 'required']) }}
|
||||
{!! $errors->first('password','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">
|
||||
{{ Form::password('password_confirmation', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password_confirm'), 'required']) }}
|
||||
{!! $errors->first('password_confirmation','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||
</div>
|
||||
<div class="row mbm">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('boilerplate::auth.register.register_button') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@if(!$firstUser)
|
||||
<a href="{{ route('boilerplate.login') }}">{{ __('boilerplate::auth.register.login_link') }}</a><br>
|
||||
@endif
|
||||
@endcomponent
|
||||
@include('auth.partials.register')
|
||||
@endsection
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
<button type="{{ $type ?? 'button' }}" class="btn {{ $class ?? ''}}"
|
||||
@isset($id) id="{{ $id }}" @endisset
|
||||
@isset($data_id) data-id="{{ $data_id }}" @endisset
|
||||
{{ $metadata ?? null }}
|
||||
@isset($dataId) data-id="{{ $dataId }}" @endisset
|
||||
@isset($title) title="{{ $title }}" data-toggle="tooltip" @endisset
|
||||
@isset($loading_text) data-loading-text="{{ $loading_text }}" @endisset
|
||||
@isset($loadingText) data-loading-text="{{ $loadingText }}" @endisset
|
||||
@isset($tooltip) data-toggle="tooltip" data-tooltip="{{ $tooltip }}" @endisset
|
||||
@isset($popover) data-toggle="popover" data-content="{{ $popover }}" @endisset
|
||||
@isset($placement) data-placement="{{ $placement ?? 'auto' }}" @endisset
|
||||
@isset($trigger) data-trigger="{{ $trigger }}" @endisset
|
||||
@isset($container) data-container="{{ $container }}" @endisset
|
||||
@isset($html) data-html="true" @endisset
|
||||
@isset($metadata) {{ $metadata }} @endisset
|
||||
>
|
||||
@if ($icon ?? false)<i class="fa fa-fw {{ $icon ?? '' }}"></i>@endif
|
||||
<i class="fa fa-fw {{ $icon ?? '' }}"></i>
|
||||
{{ $txt ?? '' }}
|
||||
</button>
|
||||
</button>
|
||||
|
||||
9
resources/views/paybox/aborted.blade.php
Normal file
9
resources/views/paybox/aborted.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
You canceled the payment.
|
||||
</body>
|
||||
</html>
|
||||
9
resources/views/paybox/accepted.blade.php
Normal file
9
resources/views/paybox/accepted.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
Thank you for your payment. Your payment should be accepted soon.
|
||||
</body>
|
||||
</html>
|
||||
9
resources/views/paybox/refused.blade.php
Normal file
9
resources/views/paybox/refused.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
It seems your payment has been refused.
|
||||
</body>
|
||||
</html>
|
||||
19
resources/views/paybox/send.blade.php
Normal file
19
resources/views/paybox/send.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Send Paybox payment</title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="{{ $url }}" id="paybox-payment">
|
||||
@foreach ($parameters as $name => $value)
|
||||
<input type="hidden" name="{{ $name }}" value="{{ $value }}">
|
||||
@endforeach
|
||||
|
||||
<input type="submit" value="Send payment">
|
||||
</form>
|
||||
<script>
|
||||
document.getElementById("paybox-payment").submit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
9
resources/views/paybox/waiting.blade.php
Normal file
9
resources/views/paybox/waiting.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
Your payment is waiting. It might take some time until it is completed.
|
||||
</body>
|
||||
</html>
|
||||
@@ -20,6 +20,7 @@
|
||||
<script src="{{ mix('/bootstrap.min.js', '/assets/vendor/boilerplate') }}"></script>
|
||||
<script src="{{ mix('/admin-lte.min.js', '/assets/vendor/boilerplate') }}"></script>
|
||||
<script src="{{ mix('/boilerplate.min.js', '/assets/vendor/boilerplate') }}"></script>
|
||||
<script>$.ajaxSetup({headers:{'X-CSRF-TOKEN':'{{ csrf_token() }}'}});</script>
|
||||
@stack('js')
|
||||
</body>
|
||||
</html>
|
||||
@@ -28,14 +28,16 @@
|
||||
@if(config('boilerplate.locale.switch', false))
|
||||
<div class="dropdown-wrapper">
|
||||
<div class="form-group">
|
||||
<select class="form-control form-control-sm" onchange="if (this.value) window.location.href=this.value">
|
||||
{!! Form::open(['route' => 'boilerplate.lang.switch', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||
<select class="form-control form-control-sm" name="lang" onchange="this.form.submit()">
|
||||
@foreach(collect(config('boilerplate.locale.languages'))->map(function($e){return $e['label'];})->toArray() as $lang => $label)
|
||||
<option value="{{ route('boilerplate.lang.switch', $lang) }}" {{ $lang === App::getLocale() ? 'selected' : '' }}>{{ $label }}</option>
|
||||
<option value="{{ $lang }}" {{ $lang === App::getLocale() ? 'selected' : '' }}>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endcomponent
|
||||
@endsection
|
||||
@endsection
|
||||
@@ -21,13 +21,20 @@
|
||||
</div>
|
||||
@endif
|
||||
@if($type === 'password')
|
||||
{!! Form::password($name, array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
{!! Form::password($name, array_merge(['class' => 'form-control'.$errors->first($nameDot,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@elseif($type === 'file')
|
||||
{!! Form::file($name, array_merge(['class' => 'form-control-file'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
{!! Form::file($name, array_merge(['class' => 'form-control-file'.$errors->first($nameDot,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@elseif($type === 'select')
|
||||
{!! Form::select($name, $options ?? [], old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
{!! Form::select($name, $options ?? [], old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($nameDot,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@else
|
||||
{!! Form::{$type ?? 'text'}($name, old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($name,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@if($clearable ?? false)
|
||||
<div class="input-clearable">
|
||||
<span class="fa fa-times fa-xs"{!! old($name, $value ?? '') !== '' ? ' style="display:block"' : '' !!}></span>
|
||||
@endif
|
||||
{!! Form::{$type ?? 'text'}($name, old($name, $value ?? ''), array_merge(['class' => 'form-control'.$errors->first($nameDot,' is-invalid').(isset($class) ? ' '.$class : '')], $attributes)) !!}
|
||||
@if($clearable ?? false)
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@if($append || $appendText)
|
||||
<div class="input-group-append">
|
||||
@@ -44,7 +51,7 @@
|
||||
@if($help ?? false)
|
||||
<small class="form-text text-muted">@lang($help)</small>
|
||||
@endif
|
||||
@error($name)
|
||||
@error($nameDot)
|
||||
<div class="error-bubble"><div>{{ $message }}</div></div>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@isset($label)
|
||||
<label for="{{ $id }}">{!! __($label) !!}</label>
|
||||
@endisset
|
||||
<select id="{{ $id }}" name="{{ $name }}" class="form-control{{ $errors->first($name,' is-invalid') }}{{ isset($class) ? ' '.$class : '' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!} style="visibility:hidden;height:1rem" autocomplete="off">
|
||||
<select id="{{ $id }}" name="{{ $name }}" class="form-control{{ $errors->first($nameDot,' is-invalid') }}{{ isset($class) ? ' '.$class : '' }}"{!! !empty($attributes) ? ' '.$attributes : '' !!} style="visibility:hidden;height:1rem" autocomplete="off">
|
||||
@if(!isset($multiple))
|
||||
<option></option>
|
||||
@endif
|
||||
@@ -20,7 +20,7 @@
|
||||
@if($help ?? false)
|
||||
<small class="form-text text-muted">@lang($help)</small>
|
||||
@endif
|
||||
@error($name)
|
||||
@error($nameDot)
|
||||
<div class="error-bubble"><div>{{ $message }}</div></div>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -28,21 +28,36 @@
|
||||
@component('boilerplate::minify')
|
||||
<script>
|
||||
whenAssetIsLoaded('select2', () => {
|
||||
let parent = $('#{{ $id }}').parent();
|
||||
$('#{{ $id }}').select2({
|
||||
window.{{ 'S2_'.\Str::camel($id) }} = $('#{{ $id }}').select2({
|
||||
placeholder: '{{ $placeholder ?? '—' }}',
|
||||
allowClear: {{ $allowClear }},
|
||||
language: "{{ App::getLocale() }}",
|
||||
direction: "@lang('boilerplate::layout.direction')",
|
||||
minimumInputLength: {{ $minimumInputLength ?? 0 }},
|
||||
minimumInputLength: {{ $minimumInputLength ?? intval(isset($model)) }},
|
||||
minimumResultsForSearch: {{ $minimumResultsForSearch ?? 10 }},
|
||||
width: '100%',
|
||||
dropdownAutoWidth: true,
|
||||
dropdownParent: parent,
|
||||
dropdownParent: $('#{{ $id }}').parent(),
|
||||
tags: {{ $tags ?? 0 }},
|
||||
escapeMarkup: function(markup) { return markup },
|
||||
@isset($ajax)
|
||||
ajax: {
|
||||
delay: 200,
|
||||
url: '{{ $ajax }}',
|
||||
data: function (param) {
|
||||
return {
|
||||
q: param.term,
|
||||
length: {{ $maxLength ?? 10 }},
|
||||
@isset($model)
|
||||
m: "{{ $model }}",
|
||||
@endisset
|
||||
@if(!empty($ajaxParams))
|
||||
@foreach ($ajaxParams as $k => $v)
|
||||
{{ $k }}: "{{ $v }}",
|
||||
@endforeach
|
||||
@endif
|
||||
}
|
||||
},
|
||||
method: 'post'
|
||||
}
|
||||
@endisset
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
@isset($label)
|
||||
<label for="{{ $id }}">{!! __($label) !!}</label>
|
||||
@endisset
|
||||
<textarea id="{{ $id }}" name="{{ $name }}"{!! !empty($attributes) ? ' '.$attributes : '' !!} style="visibility:hidden">{!! old($name, $value ?? $slot ?? '') !!}</textarea>
|
||||
<textarea id="{{ $id }}" name="{{ $name }}"{!! !empty($attributes) ? ' '.$attributes : '' !!} style="visibility:hidden{{ $minHeight ?? false ? ';min-height:'.$minHeight.'px' : '' }}">{!! old($name, $value ?? $slot ?? '') !!}</textarea>
|
||||
@if($help ?? false)
|
||||
<small class="form-text text-muted">@lang($help)</small>
|
||||
@endif
|
||||
@error($name)
|
||||
@error($nameDot)
|
||||
<div class="error-bubble"><div>{{ $message }}</div></div>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -17,9 +17,11 @@
|
||||
@component('boilerplate::minify')
|
||||
<script>
|
||||
whenAssetIsLoaded('{!! mix('/plugins/tinymce/tinymce.min.js', '/assets/vendor/boilerplate') !!}', () => {
|
||||
tinymce.init({
|
||||
window.{{ 'MCE_'.\Str::camel($id) }} = tinymce.init({
|
||||
selector: '#{{ $id }}',
|
||||
toolbar_sticky: {{ ($sticky ?? false) ? 'true' : 'false' }},
|
||||
{{ $minHeight ?? false ? 'min_height:'.$minHeight.',' : '' }}
|
||||
{{ $maxHeight ?? false ? 'max_height:'.$maxHeight.',' : '' }}
|
||||
@if(setting('darkmode', false) && config('boilerplate.theme.darkmode'))
|
||||
skin : "boilerplate-dark",
|
||||
content_css: 'boilerplate-dark',
|
||||
@@ -27,7 +29,7 @@
|
||||
skin : "oxide",
|
||||
content_css: null,
|
||||
@endif
|
||||
@if(App::getLocale() !== 'en')
|
||||
@if(App::getLocale() !== 'en')
|
||||
language: '{{ App::getLocale() }}'
|
||||
@endif
|
||||
});
|
||||
|
||||
@@ -1,34 +1,30 @@
|
||||
<div class="content-header pt-2 pb-1">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2 align-items-end">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0">
|
||||
{{ $title }}
|
||||
@if(isset($subtitle))
|
||||
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
|
||||
@endif
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right text-sm">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('boilerplate.dashboard') }}">
|
||||
{{ __('boilerplate::layout.home') }}
|
||||
</a>
|
||||
</li>
|
||||
@if(isset($breadcrumb))
|
||||
@foreach($breadcrumb as $label => $route)
|
||||
@if(is_numeric($label))
|
||||
<li class="breadcrumb-item active">{{ $route }}</li>
|
||||
@elseif(is_array($route))
|
||||
<li class="breadcrumb-item"><a href="{{ route($route[0], $route[1]) }}">{{ $label }}</a></li>
|
||||
@else
|
||||
<li class="breadcrumb-item"><a href="{{ route($route) }}">{{ $label }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</ol>
|
||||
</div>
|
||||
<div class="d-flex align-items-end flex-wrap justify-content-between pb-2">
|
||||
<h1 class="m-0 pr-3">
|
||||
{{ $title }}
|
||||
@if(isset($subtitle))
|
||||
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
|
||||
@endif
|
||||
</h1>
|
||||
<ol class="breadcrumb text-sm">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('boilerplate.dashboard') }}">
|
||||
{{ __('boilerplate::layout.home') }}
|
||||
</a>
|
||||
</li>
|
||||
@if(isset($breadcrumb))
|
||||
@foreach($breadcrumb as $label => $route)
|
||||
@if(is_numeric($label))
|
||||
<li class="breadcrumb-item active">{{ $route }}</li>
|
||||
@elseif(is_array($route))
|
||||
<li class="breadcrumb-item"><a href="{{ route($route[0], $route[1]) }}">{{ $label }}</a></li>
|
||||
@else
|
||||
<li class="breadcrumb-item"><a href="{{ route($route) }}">{{ $label }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<footer class="main-footer text-sm">
|
||||
<strong>
|
||||
© {{ date('Y') }}
|
||||
@if(config('boilerplate.theme.footer.vendorlink'))
|
||||
<a href="{{ config('boilerplate.theme.footer.vendorlink') }}">
|
||||
{!! config('boilerplate.theme.footer.vendorname') !!}
|
||||
</a>.
|
||||
@else
|
||||
{!! config('boilerplate.theme.footer.vendorname') !!}.
|
||||
@endif
|
||||
</strong>
|
||||
{{ __('boilerplate::layout.rightsres') }}
|
||||
<div class="float-right d-none d-sm-inline">
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
<div>
|
||||
<strong>
|
||||
© {{ date('Y') }}
|
||||
@if(config('boilerplate.theme.footer.vendorlink'))
|
||||
<a href="{{ config('boilerplate.theme.footer.vendorlink') }}">
|
||||
{!! config('boilerplate.theme.footer.vendorname') !!}
|
||||
</a>.
|
||||
@else
|
||||
{!! config('boilerplate.theme.footer.vendorname') !!}.
|
||||
@endif
|
||||
</strong>
|
||||
{{ __('boilerplate::layout.rightsres') }}
|
||||
</div>
|
||||
<a href="https://github.com/sebastienheyd/boilerplate">
|
||||
Boilerplate
|
||||
Boilerplate | {{ \Composer\InstalledVersions::getPrettyVersion('sebastienheyd/boilerplate') }}
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -6,59 +6,20 @@
|
||||
<i class="fas fa-fw fa-bars"></i>
|
||||
</a>
|
||||
</li>
|
||||
@foreach(app('boilerplate.navbar.items')->getItems('left') as $view){!! $view !!}@endforeach
|
||||
</ul>
|
||||
@foreach(app('boilerplate.navbar.items')->getItems('left') as $view)
|
||||
{!! $view !!}
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="navbar-right ml-auto d-flex">
|
||||
@foreach(app('boilerplate.navbar.items')->getItems('right') as $view)
|
||||
{!! $view !!}
|
||||
@endforeach
|
||||
<ul class="nav navbar-nav">
|
||||
@if(config('boilerplate.locale.switch', false))
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle px-2" data-toggle="dropdown" href="#" aria-expanded="false">
|
||||
{{ Config::get('boilerplate.locale.languages.'.App::getLocale().'.label') }}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" style="left: inherit; right: 0px;">
|
||||
@foreach(collect(config('boilerplate.locale.languages'))->map(function($e){return $e['label'];})->toArray() as $lang => $label)
|
||||
@if ($lang !== App::getLocale())
|
||||
<a href="{{ route('boilerplate.lang.switch', $lang) }}" class="dropdown-item">{{ $label }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
@if(config('boilerplate.theme.navbar.user.visible'))
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('boilerplate.user.profile') }}" class="nav-link d-flex align-items-center px-2">
|
||||
<img src="{{ Auth::user()->avatar_url }}" class="avatar-img img-circle bg-gray mr-0 mr-md-2 elevation-{{ config('boilerplate.theme.navbar.user.shadow') }}" alt="{{ Auth::user()->name }}" height="32">
|
||||
<span class="d-none d-md-block">{{ Auth::user()->name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if(config('boilerplate.theme.darkmode', false))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link px-2" data-widget="darkmode" href="#" role="button">
|
||||
@if(setting('darkmode', false))
|
||||
<i class="fas fa-fw fa-sun"></i>
|
||||
@else
|
||||
<i class="far fa-fw fa-moon"></i>
|
||||
@endif
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if(config('boilerplate.theme.fullscreen', false))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link px-2" data-widget="fullscreen" href="#" role="button">
|
||||
<i class="fas fa-fw fa-expand-arrows-alt"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@includeWhen(config('boilerplate.theme.navbar.user.visible'), 'boilerplate::layout.header.user')
|
||||
@foreach(app('boilerplate.navbar.items')->getItems('right') as $view){!! $view !!}@endforeach
|
||||
@includeWhen((config('boilerplate.app.allowImpersonate') && Auth::user()->hasRole('admin')) || session()->has('impersonate'), 'boilerplate::layout.header.impersonate')
|
||||
@includeWhen(config('boilerplate.locale.switch', false), 'boilerplate::layout.header.language')
|
||||
@includeWhen(config('boilerplate.theme.darkmode', false), 'boilerplate::layout.header.darkmode')
|
||||
@includeWhen(config('boilerplate.theme.fullscreen', false), 'boilerplate::layout.header.fullscreen')
|
||||
<li class="nav-item">
|
||||
{!! Form::open(['route' => 'boilerplate.logout', 'method' => 'post', 'id' => 'logout-form']) !!}
|
||||
<button type="submit" class="btn nav-link d-flex align-items-center logout px-2" data-question="{{ __('boilerplate::layout.logoutconfirm') }}">
|
||||
<button type="submit" class="btn nav-link d-flex align-items-center logout px-2" data-question="{{ __('boilerplate::layout.logoutconfirm') }}" data-toggle="tooltip" title="@lang('boilerplate::layout.logout')">
|
||||
<span class="fa fa-fw fa-power-off hidden-xs pr-1"></span>
|
||||
</button>
|
||||
{!! Form::close() !!}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
$.ajaxSetup({headers:{'X-CSRF-TOKEN':'{{ csrf_token() }}'}});
|
||||
bootbox.setLocale('{{ App::getLocale() }}');
|
||||
var bpRoutes={
|
||||
settings:"{{ route('boilerplate.settings',null,false) }}"
|
||||
settings:"{{ route('boilerplate.user.settings',null,false) }}"
|
||||
};
|
||||
var session={
|
||||
keepalive:"{{ route('boilerplate.keepalive', null, false) }}",
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
<aside class="main-sidebar sidebar-{{ config('boilerplate.theme.sidebar.type') }}-{{ config('boilerplate.theme.sidebar.links.bg') }} elevation-{{ config('boilerplate.theme.sidebar.shadow') }}">
|
||||
<a href="{{ route('boilerplate.dashboard') }}" class="brand-link {{ !empty(config('boilerplate.theme.sidebar.brand.bg')) ? 'bg-'.config('boilerplate.theme.sidebar.brand.bg') : ''}}">
|
||||
<a href="{{ route('boilerplate.dashboard') }}" class="brand-link d-flex {{ !empty(config('boilerplate.theme.sidebar.brand.bg')) ? 'bg-'.config('boilerplate.theme.sidebar.brand.bg') : ''}}">
|
||||
<span class="brand-logo bg-{{ config('boilerplate.theme.sidebar.brand.logo.bg') }} elevation-{{ config('boilerplate.theme.sidebar.brand.logo.shadow') }}">
|
||||
{!! config('boilerplate.theme.sidebar.brand.logo.icon') !!}
|
||||
</span>
|
||||
<span class="brand-text">{!! config('boilerplate.theme.sidebar.brand.logo.text') !!}</span>
|
||||
<span class="brand-text text-truncate pr-2" title="{!! strip_tags(config('boilerplate.theme.sidebar.brand.logo.text')) !!}">{!! config('boilerplate.theme.sidebar.brand.logo.text') !!}</span>
|
||||
</a>
|
||||
<div class="sidebar">
|
||||
@if(config('boilerplate.theme.sidebar.user.visible'))
|
||||
<div class="user-panel py-3 d-flex">
|
||||
<div class="user-panel d-flex align-items-center">
|
||||
<div class="image">
|
||||
<img src="{{ Auth::user()->avatar_url }}" class="avatar-img img-circle elevation-{{ config('boilerplate.theme.sidebar.user.shadow') }}" alt="{{ Auth::user()->name }}">
|
||||
</div>
|
||||
<div class="info">
|
||||
<a href="{{ route('boilerplate.user.profile') }}" class="d-block">{{ Auth::user()->name }}</a>
|
||||
<a href="{{ route('boilerplate.user.profile') }}" class="d-flex flex-wrap">
|
||||
<span class="mr-1">{{ Auth::user()->first_name }}</span>
|
||||
<span class="text-truncate text-uppercase font-weight-bolder">{{ Auth::user()->last_name }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<nav class="mt-3">
|
||||
<nav class="mt-2">
|
||||
{!! $menu !!}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@component('boilerplate::card')
|
||||
@empty($percents)
|
||||
{{ __('boilerplate::logs.list.empty-logs') }}
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="mb-3 ml-auto mr-auto col-md-6 col-lg-3">
|
||||
<canvas id="stats-doughnut-chart" height="300"></canvas>
|
||||
@@ -40,6 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endempty
|
||||
@slot('footer')
|
||||
<div class="text-right text-muted small">
|
||||
{!! __('boilerplate::logs.vendor') !!}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">
|
||||
<span class="badge badge-pill badge-default">{{ trans('log-viewer::general.empty-logs') }}</span>
|
||||
<span class="badge badge-pill badge-default">{{ __('boilerplate::logs.list.empty-logs') }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@@ -28,15 +28,21 @@
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
@component('boilerplate::card', ['title' => __('boilerplate::logs.show.levels'), 'color' => 'info'])
|
||||
@include('boilerplate::logs._partials.levels')
|
||||
@endcomponent
|
||||
@component('boilerplate::card', ['title' => __('boilerplate::logs.show.loginfo'), 'color' => 'warning'])
|
||||
@include('boilerplate::logs._partials.informations')
|
||||
@endcomponent
|
||||
<div class="col-12 col-xl-3">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 col-lg-6 col-xl-12">
|
||||
@component('boilerplate::card', ['title' => __('boilerplate::logs.show.levels'), 'color' => 'info'])
|
||||
@include('boilerplate::logs._partials.levels')
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-6 col-xl-12">
|
||||
@component('boilerplate::card', ['title' => __('boilerplate::logs.show.loginfo'), 'color' => 'warning'])
|
||||
@include('boilerplate::logs._partials.informations')
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="col-12 col-xl-9">
|
||||
@component('boilerplate::card', ['title' => ucfirst(__('boilerplate::logs.show.file', ['date' => $date]))])
|
||||
<div class="table-responsive">
|
||||
<table id="entries" class="table table-sm">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@component('boilerplate::card', ['color' => 'warning', 'title' => 'CodeMirror'])
|
||||
Usage :
|
||||
<pre><x-boilerplate::codemirror name="code">.color { color: red; }</x-boilerplate::codemirror></pre>
|
||||
<x-boilerplate::codemirror name="code"><h1>CodeMirror demo</h1>
|
||||
@component('boilerplate::codemirror', ['name' => 'code'])<h1>CodeMirror demo</h1>
|
||||
<style>
|
||||
.color {
|
||||
color: red;
|
||||
@@ -12,7 +12,7 @@
|
||||
alert('demo');
|
||||
});
|
||||
</script>
|
||||
</x-boilerplate::codemirror>
|
||||
@endcomponent
|
||||
@slot('footer')
|
||||
<div class="small text-muted text-right">
|
||||
<a href="https://sebastienheyd.github.io/boilerplate/components/codemirror" target="_blank">component</a> /
|
||||
|
||||
@@ -7,38 +7,38 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 d-flex">
|
||||
<x-boilerplate::icheck name="c1" label="" class="mb-0" checked />
|
||||
<x-boilerplate::icheck name="c1" label="" class="mb-0" />
|
||||
<x-boilerplate::icheck name="c1" label="Primary checkbox" class="mb-0" disabled />
|
||||
@component('boilerplate::icheck', ['name' => 'c1', 'label' => '', 'class' => 'mb-0', 'checked' => true])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'c1', 'label' => '', 'class' => 'mb-0'])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'c1', 'label' => 'Primary checkbox', 'class' => 'mb-0', 'disabled' => true])@endcomponent
|
||||
</div>
|
||||
<div class="col-sm-6 d-flex">
|
||||
<x-boilerplate::icheck name="r1" type="radio" label="" class="mb-0" checked />
|
||||
<x-boilerplate::icheck name="r1" type="radio" label="" class="mb-0" />
|
||||
<x-boilerplate::icheck name="r1" type="radio" label="Primary radio" class="mb-0" disabled />
|
||||
@component('boilerplate::icheck', ['name' => 'r1', 'type' => 'radio', 'label' => '', 'class' => 'mb-0', 'checked' => true])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'r1', 'type' => 'radio', 'label' => '', 'class' => 'mb-0'])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'r1', 'type' => 'radio', 'label' => 'Primary checkbox', 'class' => 'mb-0', 'disabled' => true])@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 d-flex">
|
||||
<x-boilerplate::icheck color="danger" name="c2" label="" class="mb-0" checked />
|
||||
<x-boilerplate::icheck color="danger" name="c2" label="" class="mb-0" />
|
||||
<x-boilerplate::icheck color="danger" name="c2" label="Danger checkbox" class="mb-0" disabled />
|
||||
@component('boilerplate::icheck', ['name' => 'c2', 'color' => 'danger', 'label' => '', 'class' => 'mb-0', 'checked' => true])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'c2', 'color' => 'danger', 'label' => '', 'class' => 'mb-0'])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'c2', 'color' => 'danger', 'label' => 'Primary checkbox', 'class' => 'mb-0', 'disabled' => true])@endcomponent
|
||||
</div>
|
||||
<div class="col-sm-6 d-flex">
|
||||
<x-boilerplate::icheck color="danger" name="r2" type="radio" label="" class="mb-0" checked />
|
||||
<x-boilerplate::icheck color="danger" name="r2" type="radio" label="" class="mb-0" />
|
||||
<x-boilerplate::icheck color="danger" name="r2" type="radio" label="Danger radio" class="mb-0" disabled />
|
||||
@component('boilerplate::icheck', ['name' => 'r2', 'color' => 'danger', 'type' => 'radio', 'label' => '', 'class' => 'mb-0', 'checked' => true])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'r2', 'color' => 'danger', 'type' => 'radio', 'label' => '', 'class' => 'mb-0'])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'r2', 'color' => 'danger', 'type' => 'radio', 'label' => 'Primary checkbox', 'class' => 'mb-0', 'disabled' => true])@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 d-flex">
|
||||
<x-boilerplate::icheck color="success" name="c3" label="" class="mb-0" checked />
|
||||
<x-boilerplate::icheck color="success" name="c3" label="" class="mb-0" />
|
||||
<x-boilerplate::icheck color="success" name="c3" label="Danger checkbox" class="mb-0" disabled />
|
||||
@component('boilerplate::icheck', ['name' => 'c3', 'color' => 'success', 'label' => '', 'class' => 'mb-0', 'checked' => true])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'c3', 'color' => 'success', 'label' => '', 'class' => 'mb-0'])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'c3', 'color' => 'success', 'label' => 'Primary checkbox', 'class' => 'mb-0', 'disabled' => true])@endcomponent
|
||||
</div>
|
||||
<div class="col-sm-6 d-flex">
|
||||
<x-boilerplate::icheck color="success" name="r3" type="radio" label="" class="mb-0" checked />
|
||||
<x-boilerplate::icheck color="success" name="r3" type="radio" label="" class="mb-0" />
|
||||
<x-boilerplate::icheck color="success" name="r3" type="radio" label="Danger radio" class="mb-0" disabled />
|
||||
@component('boilerplate::icheck', ['name' => 'r3', 'color' => 'success', 'type' => 'radio', 'label' => '', 'class' => 'mb-0', 'checked' => true])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'r3', 'color' => 'success', 'type' => 'radio', 'label' => '', 'class' => 'mb-0'])@endcomponent
|
||||
@component('boilerplate::icheck', ['name' => 'r3', 'color' => 'success', 'type' => 'radio', 'label' => 'Primary checkbox', 'class' => 'mb-0', 'disabled' => true])@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
</div>
|
||||
</div>
|
||||
@component('boilerplate::card')
|
||||
<x-boilerplate::datatable name="roles" />
|
||||
@component('boilerplate::datatable', ['name' => 'roles']) @endcomponent
|
||||
@endcomponent
|
||||
@endsection
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@component('boilerplate::card')
|
||||
<x-boilerplate::datatable name="users"/>
|
||||
@component('boilerplate::datatable', ['name' => 'users']) @endcomponent
|
||||
@endcomponent
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Orders')->name('Orders.')->group(function () {
|
||||
Route::get('', 'OrderController@index')->name('index');
|
||||
Route::get('create', 'OrderController@create')->name('create');
|
||||
Route::delete('destroy', 'OrderController@destroy')->name('destroy');
|
||||
Route::post('update', 'OrderController@update')->name('update');
|
||||
Route::post('store', 'OrderController@store')->name('store');
|
||||
Route::get('edit/{id}', 'OrderController@edit')->name('edit');
|
||||
|
||||
Route::get('', 'OrderController@index')->name('index');
|
||||
Route::get('create', 'OrderController@create')->name('create');
|
||||
Route::delete('destroy', 'OrderController@destroy')->name('destroy');
|
||||
Route::post('update', 'OrderController@update')->name('update');
|
||||
Route::post('store', 'OrderController@store')->name('store');
|
||||
Route::get('edit/{id}', 'OrderController@edit')->name('edit');
|
||||
});
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ Route::middleware('auth')->prefix('Shop')->namespace('Shop')->name('Shop.')->gro
|
||||
include __DIR__ . '/Invoices.php';
|
||||
include __DIR__ . '/Merchandises.php';
|
||||
include __DIR__ . '/Offers.php';
|
||||
include __DIR__ . '/OrderPayments.php';
|
||||
include __DIR__ . '/Orders.php';
|
||||
include __DIR__ . '/Packages.php';
|
||||
include __DIR__ . '/PriceLists.php';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Basket')->name('Basket.')->group(function () {
|
||||
Route::prefix('Panier')->name('Basket.')->group(function () {
|
||||
Route::post('getPrice', 'BasketController@getPrice')->name('getPrice');
|
||||
Route::post('addBasket', 'BasketController@addBasket')->name('addBasket');
|
||||
Route::get('modalBasket/{offer_id?}/{quantity?}', 'BasketController@modalBasket')->name('modalBasket');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Categories')->name('Categories.')->group(function () {
|
||||
Route::prefix('Rayons')->name('Categories.')->group(function () {
|
||||
Route::get('', 'CategoryController@index')->name('index');
|
||||
Route::any('show/{id}', 'CategoryController@show')->name('show');
|
||||
Route::get('getTree', 'CategoryController@getTree')->name('getTree');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Customers')->name('Customers.')->group(function () {
|
||||
Route::prefix('Clients')->name('Customers.')->group(function () {
|
||||
Route::get('show/{id}', 'CustomerController@show')->name('show');
|
||||
Route::get('profile/{id?}', 'CustomerController@profile')->name('profile');
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Invoices')->name('Invoices.')->group(function () {
|
||||
Route::prefix('Factures')->name('Invoices.')->group(function () {
|
||||
Route::get('show/{id}', 'InvoiceController@show')->name('show');
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
Route::prefix('Offers')->name('Offers.')->group(function () {
|
||||
Route::prefix('Offres')->name('Offers.')->group(function () {
|
||||
Route::get('show/{id}', 'OfferController@show')->name('show');
|
||||
});
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user