begin order form with registration
This commit is contained in:
@@ -11,8 +11,7 @@ class HomepageController extends Controller
|
|||||||
{
|
{
|
||||||
public function index(HomepagesDataTable $dataTable)
|
public function index(HomepagesDataTable $dataTable)
|
||||||
{
|
{
|
||||||
$data = [];
|
return $dataTable->render('Admin.Shop.Homepages.list', $data ?? []);
|
||||||
return $dataTable->render('Admin.Shop.Homepages.list', $data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
@@ -33,7 +32,7 @@ class HomepageController extends Controller
|
|||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$data['homepage'] = Homepages::edit($id);
|
$data['homepage'] = Homepages::get($id);
|
||||||
return view('Admin.Shop.Homepages.edit', $data);
|
return view('Admin.Shop.Homepages.edit', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,7 @@ use Illuminate\Foundation\Bus\DispatchesJobs;
|
|||||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
use Illuminate\Routing\Controller as BaseController;
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
|
||||||
use App\Repositories\Shop\Categories;
|
|
||||||
|
|
||||||
class Controller extends BaseController
|
class Controller extends BaseController
|
||||||
{
|
{
|
||||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||||
|
|
||||||
public static function init()
|
|
||||||
{
|
|
||||||
$data['categories'] = Categories::getTreeVisibles();
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ class ArticleController extends Controller
|
|||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
$data = self::init();
|
|
||||||
$data['article'] = Articles::getArticleToSell($id);
|
$data['article'] = Articles::getArticleToSell($id);
|
||||||
return view('Shop.Articles.show', $data);
|
return view('Shop.Articles.show', $data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ class RegisterController extends Controller
|
|||||||
|
|
||||||
public function showRegistrationForm()
|
public function showRegistrationForm()
|
||||||
{
|
{
|
||||||
$data = self::init();
|
|
||||||
return view('Shop.auth.register', $data ?? []);
|
return view('Shop.auth.register', $data ?? []);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +80,6 @@ class RegisterController extends Controller
|
|||||||
public function emailSendVerification(Request $request)
|
public function emailSendVerification(Request $request)
|
||||||
{
|
{
|
||||||
$request->user()->sendEmailVerificationNotification();
|
$request->user()->sendEmailVerificationNotification();
|
||||||
|
|
||||||
return back()->with('message', 'Verification link sent!');
|
return back()->with('message', 'Verification link sent!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use App\Http\Controllers\Controller;
|
|||||||
use App\Repositories\Core\User\ShopCart;
|
use App\Repositories\Core\User\ShopCart;
|
||||||
use App\Repositories\Shop\Offers;
|
use App\Repositories\Shop\Offers;
|
||||||
use App\Repositories\Shop\Orders;
|
use App\Repositories\Shop\Orders;
|
||||||
|
use App\Repositories\Users;
|
||||||
|
|
||||||
class BasketController extends Controller
|
class BasketController extends Controller
|
||||||
{
|
{
|
||||||
@@ -37,10 +37,7 @@ class BasketController extends Controller
|
|||||||
|
|
||||||
public function basket()
|
public function basket()
|
||||||
{
|
{
|
||||||
$data = self::init();
|
|
||||||
$data['basket'] = Offers::getBasket();
|
$data['basket'] = Offers::getBasket();
|
||||||
// dump($data['basket']);
|
|
||||||
// exit;
|
|
||||||
return view('Shop.Baskets.basket', $data);
|
return view('Shop.Baskets.basket', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ use App\Http\Controllers\Controller;
|
|||||||
|
|
||||||
use App\Repositories\Shop\Articles;
|
use App\Repositories\Shop\Articles;
|
||||||
use App\Repositories\Shop\Categories;
|
use App\Repositories\Shop\Categories;
|
||||||
use App\Repositories\Shop\Offers;
|
|
||||||
use App\Repositories\Shop\Tags;
|
|
||||||
use App\Repositories\Shop\TagGroups;
|
use App\Repositories\Shop\TagGroups;
|
||||||
|
|
||||||
use App\Datatables\Shop\CategoriesDataTable;
|
use App\Datatables\Shop\CategoriesDataTable;
|
||||||
@@ -22,23 +20,19 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
public function show(Request $request, $category_id)
|
public function show(Request $request, $category_id)
|
||||||
{
|
{
|
||||||
$data = self::init();
|
$data = [
|
||||||
$data['category'] = Categories::getFull($category_id);
|
'category' => Categories::getFull($category_id),
|
||||||
$data['breadcrumb'] = Categories::getAncestorsByCategory($category_id);
|
'breadcrumb' => Categories::getAncestorsByCategory($category_id),
|
||||||
$data['display_by_rows'] = $request->input('display_by_rows') ?? false;
|
'display_by_rows' => $request->input('display_by_rows') ?? false,
|
||||||
$data['product_type'] = $request->input('product_type') ?? 'botanic';
|
'product_type' => $request->input('product_type') ?? 'botanic',
|
||||||
$data['tags_selected'] = $request->input('tags') ?? [];
|
'tags_selected' => $request->input('tags') ?? [],
|
||||||
|
'articles' => Articles::getArticlesToSell([
|
||||||
$data['articles'] = Articles::getArticlesToSell([
|
|
||||||
'category_id' => $category_id,
|
'category_id' => $category_id,
|
||||||
'tags' => $data['tags_selected'],
|
'tags' => $request->input('tags') ?? [],
|
||||||
'product_type' => $data['product_type'],
|
'product_type' => $request->input('product_type') ?? 'botanic',
|
||||||
]);
|
]),
|
||||||
// dump($data['articles']);
|
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
|
||||||
// exit;
|
];
|
||||||
$data['tags'] = TagGroups::getWithTagsAndCountOffers($category_id);
|
|
||||||
// dump($data['tags']);
|
|
||||||
// exit;
|
|
||||||
return view('Shop.Shelves.shelve', $data);
|
return view('Shop.Shelves.shelve', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,4 @@ use App\Http\Controllers\Controller as ParentController;
|
|||||||
|
|
||||||
class Controller extends ParentController
|
class Controller extends ParentController
|
||||||
{
|
{
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// $this->middleware('auth:guest');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,13 @@ class HomeController extends Controller
|
|||||||
{
|
{
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$input = $request->input();
|
$data = [
|
||||||
$data = self::init();
|
'display_by_rows' => $request->input('by_rows') ?? false,
|
||||||
$data['display_by_rows'] = $input['by_rows'] ?? false;
|
'shelves' => Articles::getArticlesByHomepage(),
|
||||||
$data['shelves'] = Articles::getArticlesByHomepage();
|
'text' => Homepages::getHomepage(),
|
||||||
$data['text'] = Homepages::getHomepage();
|
'tags' => TagGroups::getWithTagsAndCountOffers(),
|
||||||
// dump($data['shelves']);
|
'no_filter' => true,
|
||||||
// exit;
|
];
|
||||||
$data['tags'] = TagGroups::getWithTagsAndCountOffers();
|
|
||||||
$data['no_filter'] = true;
|
|
||||||
return view('Shop.home', $data);
|
return view('Shop.home', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,83 +5,17 @@ namespace App\Http\Controllers\Shop;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
|
use App\Repositories\Core\User\ShopCart;
|
||||||
use App\Repositories\Shop\Orders;
|
use App\Repositories\Shop\Orders;
|
||||||
|
use App\Repositories\Shop\Offers;
|
||||||
|
use App\Repositories\Shop\SaleChannels;
|
||||||
|
|
||||||
class OrderController extends Controller
|
class OrderController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
public function order()
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
{
|
||||||
//
|
$data['basket'] = ShopCart::getSummary();
|
||||||
}
|
$data['sale_channel'] = SaleChannels::getDefault();
|
||||||
|
return view('Shop.Orders.order', $data);
|
||||||
/**
|
|
||||||
* Show the form for creating a new resource.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*
|
|
||||||
* @param \App\Order $order
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function show(Order $order)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for editing the specified resource.
|
|
||||||
*
|
|
||||||
* @param \App\Order $order
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function edit(Order $order)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param \App\Order $order
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function update(Request $request, Order $order)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param \App\Order $order
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function destroy(Order $order)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,12 @@ class SearchController extends Controller
|
|||||||
{
|
{
|
||||||
public function search(Request $request)
|
public function search(Request $request)
|
||||||
{
|
{
|
||||||
$data = self::init();
|
$data = [
|
||||||
$data['articles'] = Searches::getResults($request->input());
|
'articles'] => Searches::getResults($request->input()),
|
||||||
$data['articles_count'] = $data['articles'] ? count($data['articles']) : 0;
|
'articles_count' => $data['articles'] ? count($data['articles']) : 0,
|
||||||
$data['search'] = $request->input();
|
'search' = $request->input(),
|
||||||
$data['product_type'] = $request->input('product_type');
|
'product_type' => $request->input('product_type'),
|
||||||
|
];
|
||||||
return view('Shop.Search.results', $data);
|
return view('Shop.Search.results', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
app/Http/Requests/Shop/StoreOrderPost.php
Normal file
20
app/Http/Requests/Shop/StoreOrderPost.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Shop;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class StoreOrderPost extends FormRequest
|
||||||
|
{
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'user_id' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,9 @@ namespace App\Providers;
|
|||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Facades\View;
|
||||||
|
|
||||||
|
use App\View\Composers\Shop\LayoutComposer;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@@ -25,5 +28,6 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
|
View::composer('Shop.layout.layout', LayoutComposer::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,23 +2,19 @@
|
|||||||
|
|
||||||
namespace App\Repositories;
|
namespace App\Repositories;
|
||||||
|
|
||||||
use App\Repositories\Core\Auth\Users;
|
use App\Repositories\Users;
|
||||||
|
use App\Repositories\Shop\Categories;
|
||||||
|
use App\Repositories\Shop\Homepages;
|
||||||
|
|
||||||
class Config
|
class Config
|
||||||
{
|
{
|
||||||
public static function init()
|
public static function init()
|
||||||
{
|
{
|
||||||
$data['user'] = self::getUser();
|
return [
|
||||||
return ['init' => $data];
|
'auth' => Users::getUser() ? Users::getInfo() : false,
|
||||||
}
|
'categories' => Categories::getTreeVisibles(),
|
||||||
|
'footer' => Homepages::getFooter(),
|
||||||
public static function getUser()
|
'extra_footer' => Homepages::getExtraFooter(),
|
||||||
{
|
];
|
||||||
if (Users::getUser()) {
|
|
||||||
$data = Users::getInfo();
|
|
||||||
} else {
|
|
||||||
$data = false;
|
|
||||||
}
|
|
||||||
return $data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,18 +7,14 @@ use Illuminate\Support\Facades\Hash;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
use Hyn\Tenancy\Database\Connection;
|
|
||||||
use Laratrust\Traits\LaratrustUserTrait;
|
use Laratrust\Traits\LaratrustUserTrait;
|
||||||
|
use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;
|
||||||
|
|
||||||
use App\Models\Core\Auth\User;
|
use App\Models\Core\Auth\User;
|
||||||
use App\Models\Core\Auth\RoleUser;
|
use App\Models\Core\Auth\RoleUser;
|
||||||
|
|
||||||
use App\Repositories\Clients;
|
|
||||||
use App\Repositories\Partners;
|
|
||||||
use App\Repositories\Core\Upload;
|
use App\Repositories\Core\Upload;
|
||||||
|
|
||||||
use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;
|
|
||||||
|
|
||||||
class Users
|
class Users
|
||||||
{
|
{
|
||||||
use LaratrustUserTrait;
|
use LaratrustUserTrait;
|
||||||
@@ -38,44 +34,26 @@ class Users
|
|||||||
$data = $user->toArray();
|
$data = $user->toArray();
|
||||||
$data['name'] = $user->name;
|
$data['name'] = $user->name;
|
||||||
$data['avatar'] = self::getAvatar($id);
|
$data['avatar'] = self::getAvatar($id);
|
||||||
// $data['last_login'] = $user->previousLoginAt();
|
|
||||||
// $data['roles'] = self::getRoles();
|
|
||||||
// $data['permissions'] = self::getPermissions();
|
|
||||||
$data['roles'] = $user->roles->pluck('id')->toArray();
|
$data['roles'] = $user->roles->pluck('id')->toArray();
|
||||||
$data['permissions'] = $user->allPermissions()->pluck('id')->toArray();
|
$data['permissions'] = $user->allPermissions()->pluck('id')->toArray();
|
||||||
$data['clients'] = $user->clients->pluck('id')->toArray();
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function store($data)
|
public static function store($data)
|
||||||
{
|
{
|
||||||
|
if ($data['id'] ?? false) {
|
||||||
$id = isset($data['id']) ? $data['id'] : false;
|
|
||||||
|
|
||||||
if (!empty($data['password'])) {
|
|
||||||
$data['password'] = Hash::make($data['password']);
|
|
||||||
} else {
|
|
||||||
if ($id) {
|
|
||||||
unset($data['password']);
|
unset($data['password']);
|
||||||
} else {
|
|
||||||
$data['password'] = Hash::make(Str::random(8));
|
|
||||||
}
|
}
|
||||||
}
|
$user = ($data['id'] ?? false) ? self::update($data) : self::create($data);
|
||||||
$data['remember_token'] = Str::random(32);
|
|
||||||
$data['active'] = true;
|
|
||||||
|
|
||||||
$user = $id ? self::update($data, $id) : self::create($data);
|
|
||||||
$user->roles()->sync(array_keys($data['roles'] ?? []));
|
$user->roles()->sync(array_keys($data['roles'] ?? []));
|
||||||
|
|
||||||
UserClients::associate($user->id, $data['clients'] ?? false );
|
|
||||||
// $user->sendNewUserNotification($data['remember_token'], Auth::user());
|
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function create($data, $copy_password = false)
|
public static function create($data)
|
||||||
{
|
{
|
||||||
$data['password'] = $copy_password ? $data['password'] : ($data['password'] ? Hash::make($data['password']) : Hash::make(Str::random(8)));
|
$data['password'] = $data['password'] ?? Hash::make($data['password']);
|
||||||
|
$data['remember_token'] = Str::random(32);
|
||||||
|
$data['active'] = true;
|
||||||
$user = User::create($data);
|
$user = User::create($data);
|
||||||
PasswordSecurities::create($user->id);
|
PasswordSecurities::create($user->id);
|
||||||
return $user;
|
return $user;
|
||||||
@@ -208,7 +186,7 @@ class Users
|
|||||||
if (!$avatar) {
|
if (!$avatar) {
|
||||||
return '/assets/img/no-avatar.png';
|
return '/assets/img/no-avatar.png';
|
||||||
}
|
}
|
||||||
$path = Clients::isClient() ? Clients::getPublicPath('/images/avatars/') : Partners::getPublicPath('/images/avatars/');
|
$path = '/images/avatars/';
|
||||||
return $path . $avatar;
|
return $path . $avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,16 +220,6 @@ class Users
|
|||||||
return User::byUsername($username)->withTrashed()->first();
|
return User::byUsername($username)->withTrashed()->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function select_by_status_and_team_and_entity($status_id, $team_id, $third_party_id)
|
|
||||||
{
|
|
||||||
return User::active()->byStatus($status_id)->byTeam($team_id)->byThirdParty($third_party_id)->get()->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function select_datas_by_id($user_id)
|
|
||||||
{
|
|
||||||
return User::with('status')->find($user_id)->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function toggle_active($id, $active)
|
public static function toggle_active($id, $active)
|
||||||
{
|
{
|
||||||
return self::get($id)->update(['active' => $active]);
|
return self::get($id)->update(['active' => $active]);
|
||||||
@@ -276,10 +244,7 @@ class Users
|
|||||||
public static function update_password($id, $password)
|
public static function update_password($id, $password)
|
||||||
{
|
{
|
||||||
$password = Hash::make($password);
|
$password = Hash::make($password);
|
||||||
UserClients::changePasswordsByUser($id, $password);
|
|
||||||
return User::find($id)->update(['password' => $password]);
|
return User::find($id)->update(['password' => $password]);
|
||||||
// $connection = app(Connection::class);
|
|
||||||
// return User::on($connection->systemName())->find($id)->update(['password' => $password]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function validate($username, $field = 'current_password')
|
public static function validate($username, $field = 'current_password')
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ class Articles
|
|||||||
$tags[$tag['group']][] = $tag['name'];
|
$tags[$tag['group']][] = $tag['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $tags;
|
return $tags ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getPricesByArticle($article)
|
public static function getPricesByArticle($article)
|
||||||
|
|||||||
@@ -18,6 +18,16 @@ class Homepages
|
|||||||
return self::get(1)->text;
|
return self::get(1)->text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getFooter()
|
||||||
|
{
|
||||||
|
return self::get(2)->text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getExtraFooter()
|
||||||
|
{
|
||||||
|
return self::get(3)->text;
|
||||||
|
}
|
||||||
|
|
||||||
public static function get($id)
|
public static function get($id)
|
||||||
{
|
{
|
||||||
return Homepage::find($id);
|
return Homepage::find($id);
|
||||||
|
|||||||
16
app/Repositories/Users.php
Normal file
16
app/Repositories/Users.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories;
|
||||||
|
|
||||||
|
use App\Repositories\Core\Auth\Users as parentUsers;
|
||||||
|
use App\Repositories\Shop\SaleChannels;
|
||||||
|
|
||||||
|
class Users extends parentUsers
|
||||||
|
{
|
||||||
|
public static function getInfo($id = false)
|
||||||
|
{
|
||||||
|
$data = parent::getInfo($id);
|
||||||
|
$data['sale_channel'] = SaleChannels::getDefault()->toArray();
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
14
app/View/Composers/Shop/LayoutComposer.php
Normal file
14
app/View/Composers/Shop/LayoutComposer.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Composers\Shop;
|
||||||
|
|
||||||
|
use Illuminate\View\View;
|
||||||
|
use App\Repositories\Config;
|
||||||
|
|
||||||
|
class LayoutComposer
|
||||||
|
{
|
||||||
|
public function compose(View $view)
|
||||||
|
{
|
||||||
|
$view->with(Config::init());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -51,8 +51,8 @@ a.green-dark:hover {
|
|||||||
background-color: #F2B90F;
|
background-color: #F2B90F;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-light {
|
.bg-grey {
|
||||||
background-color: #F5F5F5;
|
background-color: #AAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.yellow {
|
.yellow {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
'Ajout dans le panier',
|
'Ajout dans le panier',
|
||||||
'basket-form',
|
'basket-form',
|
||||||
"{{ route('Shop.Basket.modalBasket') }}/" + offer_id + '/' + quantity,
|
"{{ route('Shop.Basket.modalBasket') }}/" + offer_id + '/' + quantity,
|
||||||
"{{ route('Shop.Orders.create') }}",
|
"{{ route('Shop.Orders.order') }}",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -28,47 +28,14 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
@component('components.card', ['class' => 'shadow bg-light'])
|
<x-card class='shadow bg-light'>
|
||||||
<div class="row mb-3">
|
@include('Shop.Baskets.partials.basketTotal')
|
||||||
<div class="col-6 text-uppercase">
|
|
||||||
Tarif appliqué
|
|
||||||
<span id="basket_sale_channel"></span>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
{{ $sale_channel['name'] ?? '' }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row m-3">
|
|
||||||
<div class="col-6">
|
|
||||||
<span id="basket-count"></span> ARTICLES
|
|
||||||
</div>
|
|
||||||
<div class="col-6 text-right font-weight-bold">
|
|
||||||
<span id="basket-total"></span> €
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row m-3">
|
|
||||||
<div class="col-6">
|
|
||||||
LIVRAISON
|
|
||||||
</div>
|
|
||||||
<div class="col-6 text-right font-weight-bold">
|
|
||||||
<span id="shipping">5</span> €
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="row m-3 font-weight-bold" style="font-size: 1.6em;">
|
|
||||||
<div class="col-6">
|
|
||||||
TOTAL TTC
|
|
||||||
</div>
|
|
||||||
<div class="col-6 text-right">
|
|
||||||
<span id="basket-total-shipped"></span> €
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row m-3">
|
<div class="row m-3">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<a href="" class="btn btn-green-dark">COMMANDER</a>
|
<a href="{{ route('Shop.Orders.order') }}" class="btn btn-green-dark">COMMANDER</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
35
resources/views/Shop/Baskets/partials/basketTotal.blade.php
Normal file
35
resources/views/Shop/Baskets/partials/basketTotal.blade.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-6 text-uppercase">
|
||||||
|
Tarif appliqué :
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right font-weight-bold">
|
||||||
|
<span id="basket_sale_channel">
|
||||||
|
{{ $sale_channel['name'] ?? null }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-6">
|
||||||
|
<span id="basket-count">{{ $basket['count'] ?? 0 }}</span> ARTICLES
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right font-weight-bold">
|
||||||
|
<span id="basket-total">{{ $basket['total'] ?? 0 }}</span> €
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-6">
|
||||||
|
LIVRAISON
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right font-weight-bold">
|
||||||
|
<span id="shipping">5</span> €
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row mb-3 font-weight-bold" style="font-size: 1.6em;">
|
||||||
|
<div class="col-6">
|
||||||
|
TOTAL TTC
|
||||||
|
</div>
|
||||||
|
<div class="col-6 text-right">
|
||||||
|
<span id="basket-total-shipped">{{ ($basket['total'] ?? 0) + 5 }}</span> €
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
43
resources/views/Shop/Orders/order.blade.php
Normal file
43
resources/views/Shop/Orders/order.blade.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
@extends('Shop.layout.layout', [
|
||||||
|
'title' => __('Commande'),
|
||||||
|
])
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-8">
|
||||||
|
Déja client ?
|
||||||
|
<button class="btn">Créez mon compte</button>
|
||||||
|
|
||||||
|
<x-layout.collapse id="identification" title="Déjà client">
|
||||||
|
@include('Shop.auth.partials.login')
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="personal_data" title="Informations personnelles">
|
||||||
|
@include('Shop.auth.partials.register')
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="adresses" title="Adresses">
|
||||||
|
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="delivery_mode" title="Mode de livraison">
|
||||||
|
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
<x-layout.collapse id="payment" title="Paiement">
|
||||||
|
|
||||||
|
</x-layout.collapse>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<x-card class='shadow bg-light'>
|
||||||
|
@include('Shop.Baskets.partials.basketTotal')
|
||||||
|
</x-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('js')
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
@if ($articles ?? false)
|
@if ($articles ?? false)
|
||||||
@foreach ($articles as $product_name => $article)
|
@foreach ($articles as $product_name => $article)
|
||||||
|
@if ((($product_type == 'botanic') && (($article['semences'] ?? false) || ($article['plants'] ?? false))) || (($product_type == 'merchandise') &&($article['mercchandises'] ?? false)))
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
@include('Shop.Articles.partials.article')
|
@include('Shop.Articles.partials.article')
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -4,45 +4,14 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Form::open(['route' => 'Shop.login.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
|
||||||
<div class="row" style="width: 380px;">
|
<div class="row" style="width: 380px;">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<img src="/img/logo.png" height="128">
|
<img src="/img/logo.png" height="128">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group has-feedback">
|
@include('Shop.auth.partials.login')
|
||||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
|
||||||
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
|
||||||
<span class="fa fa-email 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="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
|
||||||
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password')]) }}
|
|
||||||
<span class="fa fa-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.reset') }}">{{ __('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>
|
|
||||||
{!! Form::close() !!}
|
|
||||||
|
|
||||||
<p class="mt-3">
|
<p class="mt-3">
|
||||||
Vous n'avez pas encore de compte ?
|
Vous n'avez pas encore de compte ?
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
@if (config('app.name') == 'CRM')
|
|
||||||
@include('auth.crm')
|
|
||||||
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (config('app.name') == 'HestImmo')
|
|
||||||
@include('auth.hestimmo')
|
|
||||||
@endif
|
|
||||||
34
resources/views/Shop/auth/partials/login.blade.php
Normal file
34
resources/views/Shop/auth/partials/login.blade.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{!! Form::open(['route' => 'Shop.login.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||||
|
|
||||||
|
<div class="form-group has-feedback">
|
||||||
|
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required', 'autofocus']) }}
|
||||||
|
<span class="fa fa-email 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="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password')]) }}
|
||||||
|
<span class="fa fa-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.reset') }}">{{ __('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>
|
||||||
|
{!! Form::close() !!}
|
||||||
117
resources/views/Shop/auth/partials/register.blade.php
Normal file
117
resources/views/Shop/auth/partials/register.blade.php
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
{!! Form::open(['route' => 'Shop.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'>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<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>
|
||||||
|
<div class="col-6">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::text('company', old('company'), ['class' => 'form-control', 'placeholder' => __('Société'), 'autofocus']) }}
|
||||||
|
{!! $errors->first('company','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group {{ $errors->has('tva') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::text('tva', old('tva'), ['class' => 'form-control', 'placeholder' => __('N° de TVA'), 'autofocus']) }}
|
||||||
|
{!! $errors->first('tva','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<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>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => __('phone')]) }}
|
||||||
|
{!! $errors->first('phone','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::text('address', old('address'), ['class' => 'form-control', 'placeholder' => __('Adresse de livraison'), 'required']) }}
|
||||||
|
{!! $errors->first('address','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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']) }}
|
||||||
|
{!! $errors->first('address2','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="form-group {{ $errors->has('zipcode') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::text('zipcode', old('zipcode'), ['class' => 'form-control', 'placeholder' => __('zipcode'), 'required']) }}
|
||||||
|
{!! $errors->first('zipcode','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8">
|
||||||
|
<div class="form-group {{ $errors->has('city') ? 'has-error' : '' }}">
|
||||||
|
{{ Form::text('city', old('city'), ['class' => 'form-control', 'placeholder' => __('city'), 'required']) }}
|
||||||
|
{!! $errors->first('city','<p class="text-danger"><strong>:message</strong></p>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<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>
|
||||||
|
<div class="col-6">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
@include('components.form.checkbox', ['name' => 'use_for_invoice', 'value' => false])
|
||||||
|
Utiliser aussi cette adresse pour la facturation
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</x-card>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
@@ -4,97 +4,5 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Form::open(['route' => 'Shop.register.post', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
@include('Shop.auth.partials.register')
|
||||||
<div class="row">
|
|
||||||
<div class="col-8">
|
|
||||||
@component('components.card', ['title' => 'Créez votre compte', 'class' => 'mt-3 mb-3'])
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6">
|
|
||||||
<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>
|
|
||||||
<div class="col-6">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6">
|
|
||||||
<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>
|
|
||||||
<div class="col-6">
|
|
||||||
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
|
||||||
{{ Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => __('phone'), 'required']) }}
|
|
||||||
{!! $errors->first('phone','<p class="text-danger"><strong>:message</strong></p>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
|
|
||||||
{{ Form::text('address', old('address'), ['class' => 'form-control', 'placeholder' => __('Adresse'), 'required']) }}
|
|
||||||
{!! $errors->first('address','<p class="text-danger"><strong>:message</strong></p>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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']) }}
|
|
||||||
{!! $errors->first('address2','<p class="text-danger"><strong>:message</strong></p>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="form-group {{ $errors->has('zipcode') ? 'has-error' : '' }}">
|
|
||||||
{{ Form::text('zipcode', old('zipcode'), ['class' => 'form-control', 'placeholder' => __('zipcode'), 'required']) }}
|
|
||||||
{!! $errors->first('zipcode','<p class="text-danger"><strong>:message</strong></p>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-8">
|
|
||||||
<div class="form-group {{ $errors->has('city') ? 'has-error' : '' }}">
|
|
||||||
{{ Form::text('city', old('city'), ['class' => 'form-control', 'placeholder' => __('city'), 'required']) }}
|
|
||||||
{!! $errors->first('city','<p class="text-danger"><strong>:message</strong></p>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6">
|
|
||||||
<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>
|
|
||||||
<div class="col-6">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{!! Form::close() !!}
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
<footer id="footer">
|
<footer id="footer">
|
||||||
|
<hr>
|
||||||
|
{!! $footer ?? null !!}
|
||||||
|
{!! $extra_footer ?? null !!}
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -4,43 +4,11 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Form::open(['route' => 'boilerplate.login', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
|
||||||
<div class="row" style="width: 380px;">
|
<div class="row" style="width: 380px;">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<img src="/img/logo.png" height="128">
|
<img src="/img/logo.png" height="128">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group has-feedback">
|
@include('auth.partials.login')
|
||||||
<div class="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>
|
|
||||||
{!! $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' : '' }}">
|
|
||||||
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password')]) }}
|
|
||||||
<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-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
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
@if (config('app.name') == 'CRM')
|
|
||||||
@include('auth.crm')
|
|
||||||
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (config('app.name') == 'HestImmo')
|
|
||||||
@include('auth.hestimmo')
|
|
||||||
@endif
|
|
||||||
35
resources/views/auth/partials/login.blade.php
Normal file
35
resources/views/auth/partials/login.blade.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{!! Form::open(['route' => 'boilerplate.login', 'method' => 'post', 'autocomplete'=> 'off']) !!}
|
||||||
|
|
||||||
|
<div class="form-group has-feedback">
|
||||||
|
<div class="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>
|
||||||
|
{!! $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' : '' }}">
|
||||||
|
{{ Form::password('password', ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.password')]) }}
|
||||||
|
<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-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
|
||||||
29
resources/views/components/layout/collapse.blade.php
Normal file
29
resources/views/components/layout/collapse.blade.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<div class="card {{ $class ?? '' }}">
|
||||||
|
<div class="card-header p-0">
|
||||||
|
<div class="row">
|
||||||
|
<div class="{{ ($collapse_right ?? false) ? 'col-6' : 'col-12' }}">
|
||||||
|
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#{{ $id }}" aria-expanded="false" aria-controls="{{ $id }}">
|
||||||
|
<i class="fa {{ ($collapsed ?? true) ? 'fa-chevron-right' : 'fa-chevron-down' }}"></i>
|
||||||
|
</button>
|
||||||
|
{!! $title ?? null !!}
|
||||||
|
@if (isset($required) && $required)
|
||||||
|
<sup>*</sup>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{!! $collapse_left ?? '' !!}
|
||||||
|
|
||||||
|
<span class="check ml-5 error"></span>
|
||||||
|
</div>
|
||||||
|
@if ($collapse_right ?? false)
|
||||||
|
<div class="col-6">
|
||||||
|
{!! $collapse_right ?? '' !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="{{ $id }}" class="card-body collapse {{ ($collapsed ?? true) ? '' : 'show' }} {{ $class_body ?? '' }}">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@include('load.layout.chevron')
|
||||||
@@ -3,12 +3,10 @@
|
|||||||
<div class="row mb-2 align-items-end">
|
<div class="row mb-2 align-items-end">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h1 class="m-0 text-dark">
|
<h1 class="m-0 text-dark">
|
||||||
@if(isset($title))
|
{{ $title ?? null}}
|
||||||
{{ $title }}
|
@isset($subtitle)
|
||||||
@endif
|
|
||||||
@if(isset($subtitle))
|
|
||||||
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
|
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
|
||||||
@endif
|
@endisset
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
Route::prefix('Orders')->name('Orders.')->group(function () {
|
Route::prefix('Orders')->name('Orders.')->group(function () {
|
||||||
Route::get('', 'OrderController@index')->name('index');
|
Route::get('order', 'OrderController@order')->name('order');
|
||||||
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');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user