This commit is contained in:
ericli1018
2025-06-13 12:24:35 +08:00
parent 1caae33c43
commit 6dfe3e0677
74 changed files with 1497 additions and 253 deletions

View File

@ -82,11 +82,13 @@ class EventCrudController extends CrudController
'label' => trans('backend.columnName.post_at'),
'type' => 'datetime',
'format' => 'YYYY/MM/DD HH:mm:SS',
'default' => \Carbon\Carbon::now(),
],
[
'name' => 'is_front_show',
'label' => trans('backend.columnName.is_front_show'),
'type' => 'boolean'
'type' => 'boolean',
'default' => true,
],
[
'name' => 'title',
@ -104,6 +106,13 @@ class EventCrudController extends CrudController
'showSingleChoise' => '0', // 0=hidden, 1=show(default)
'showComment' => '0', // 0=hidden, 1=show(default)
],
[
'name' => 'event_at',
'label' => trans('backend.columnName.event_at'),
'type' => 'datetime',
'format' => 'YYYY/MM/DD HH:mm:SS',
'default' => \Carbon\Carbon::now(),
],
[
'name' => 'venue',
'label' => trans('backend.columnName.venue'),
@ -122,9 +131,9 @@ class EventCrudController extends CrudController
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],

View File

@ -19,7 +19,17 @@ class HomeCarouselCrudController extends CrudController
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
//use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\ReorderOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation { destroy as traitDestroy; }
public function destroy($id)
{
//CRUD::hasAccessOrFail('delete');
if (\App\Models\HomeCarousel::count() <= 7)
{
$this->crud->allowAccess('create');
}
return CRUD::delete($id);
}
/**
* Configure the CrudPanel object. Apply settings to all operations.
*
@ -31,6 +41,7 @@ class HomeCarouselCrudController extends CrudController
CRUD::setRoute(config('backpack.base.route_prefix') . '/home-carousel');
CRUD::setEntityNameStrings(trans('backend.home_carousel.content.item'), trans('backend.home_carousel.content.items'));
}
protected function setupReorderOperation()
@ -51,6 +62,15 @@ class HomeCarouselCrudController extends CrudController
$this->crud->orderBy('lft', 'asc')->orderBy('id', 'desc');
}
if (\App\Models\HomeCarousel::count() >= 6)
{
$this->crud->denyAccess('create');
}
else
{
$this->crud->allowAccess('create');
}
$this->crud->addColumns([
[
'name' => 'is_front_show',
@ -96,6 +116,17 @@ class HomeCarouselCrudController extends CrudController
'label' => trans('backend.columnName.link'),
'type' => 'text'
],
[
'name' => 'featured_photos',
'label' => trans('backend.columnName.featured_img'),
'type' => 'upload_img_multiple',
'upload' => true,
'disk' => 'public',
'hint' => '',
'qty' => 1, // 0=no limit, >0=limit
'showSingleChoise' => '0', // 0=hidden, 1=show(default)
'showComment' => '0', // 0=hidden, 1=show(default)
],
[
'name' => 'photos',
'label' => trans('backend.columnName.cover'),

View File

@ -82,16 +82,20 @@ class NewsCrudController extends CrudController
'label' => trans('backend.columnName.post_at'),
'type' => 'datetime',
'format' => 'YYYY/MM/DD HH:mm:SS',
'default' => \Carbon\Carbon::now(),
],
[
'name' => 'is_front_show',
'label' => trans('backend.columnName.is_front_show'),
'type' => 'boolean'
'type' => 'boolean',
'default' => true,
],
[
'name' => 'title',
'label' => trans('backend.columnName.title'),
'type' => 'text'
'type' => 'text',
],
[
'name' => 'photos',
@ -117,9 +121,9 @@ class NewsCrudController extends CrudController
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],

View File

@ -132,7 +132,8 @@ class ProductCrudController extends CrudController
[
'name' => 'is_front_show',
'label' => trans('backend.columnName.is_front_show'),
'type' => 'boolean'
'type' => 'boolean',
'default' => true,
],
[
'name' => 'tip',
@ -168,9 +169,9 @@ class ProductCrudController extends CrudController
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],
@ -183,9 +184,9 @@ class ProductCrudController extends CrudController
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],
@ -199,14 +200,62 @@ class ProductCrudController extends CrudController
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],
],
[
'name' => 'feature_resource',
'lable' => trans('backend.columnName.feature_resource'),
'type' => 'tinymce',
// optional overwrite of the configuration array
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],
],
[
'name' => 'feature_related_part',
'lable' => trans('backend.columnName.feature_related_part'),
'type' => 'tinymce',
// optional overwrite of the configuration array
'options' => [
//'selector' => 'textarea.tinymce',
//'skin' => 'dick-light',
'plugins' => 'code lists advlist image link media anchor table hr imagetools importcss insertdatetime paste searchreplace textcolor textpattern help',
'menubar' => 'edit insert view format help',
'toolbar' => 'code undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image media link',
'language' => str_replace('-', '_', app()->getLocale()),
'height' => '500px',
],
],
[
'name' => 'productRelateds',
'label' => trans('backend.columnName.product_related'),
'type' => 'select2_multiple',
'entity' => 'productRelateds',
'attribute' => 'title',
'model' => 'App\Models\Product',
'pivot' => true,
'allows_null' => true,
'select_all' => true,
'options' => (function ($query) {
$id = \Route::current()->parameter('id');
return $query->where('id', '<>', $id)->orderBy('title', 'ASC')->get();
}),
],
[
'name' => 'seo_keyword',
'label' => trans('backend.columnName.seo_keyword'),

View File

@ -97,7 +97,8 @@ class SupportDistributionPartnerCrudController extends CrudController
[
'name' => 'is_front_show',
'label' => trans('backend.columnName.is_front_show'),
'type' => 'boolean'
'type' => 'boolean',
'default' => true,
],
[
'name' => 'photos',

View File

@ -97,7 +97,8 @@ class SupportEcosystemPartnerCrudController extends CrudController
[
'name' => 'is_front_show',
'label' => trans('backend.columnName.is_front_show'),
'type' => 'boolean'
'type' => 'boolean',
'default' => true,
],
[
'name' => 'photos',

View File

@ -24,6 +24,26 @@ class UserCrudController extends OrgController
'label' => trans('backpack::permissionmanager.email'),
'type' => 'email',
],
[
'name' => 'phone',
'label' => trans('backend.columnName.phone'),
'type' => 'text',
],
[
'name' => 'country',
'label' => trans('backend.columnName.country'),
'type' => 'text',
],
[
'name' => 'company',
'label' => trans('backend.columnName.company'),
'type' => 'text',
],
[
'name' => 'job_title',
'label' => trans('backend.columnName.job_title'),
'type' => 'text',
],
[ // n-n relationship (with pivot table)
'label' => trans('backpack::permissionmanager.roles'), // Table column heading
'type' => 'select_multiple',

View File

@ -15,7 +15,7 @@ class EventsController extends Controller
$dataRows = \App\Models\Event::where('is_front_show', '=', true)
->orderBy('post_at', 'desc')
->select('id', 'title', 'venue', 'contact', 'photos', 'post_at');
->select('id', 'title', 'venue', 'event_at', 'contact', 'photos', 'post_at');
return view('events', [
'dataRows' => $dataRows->skip($pageOffset)->take($perPageItems)->get(),

View File

@ -3,6 +3,9 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
use App\Mail\SubscripeionMail;
use Validator;
class HomeController extends Controller
{
@ -14,7 +17,7 @@ class HomeController extends Controller
$newsRows = \App\Models\News::where('is_front_show', '=', true)
->orderBy('post_at', 'desc')
->take('3');
$eventRows = \App\Models\News::where('is_front_show', '=', true)
$eventRows = \App\Models\Event::where('is_front_show', '=', true)
->orderBy('post_at', 'desc')
->take('3');
return view('home', [
@ -23,4 +26,53 @@ class HomeController extends Controller
'eventRows' => $eventRows->get(),
]);
}
public function indexPost(Request $request)
{
$message = '';
$result = 'success';
$subscribeInquery = $request->input('subscribeInquery');
if ($subscribeInquery)
{
try
{
//$request->validate();
$validator = Validator::make($request->all(), [
'subscribeInquery' => 'required|email',
], $messages = [
'required' => 'The :attribute field is required.',
'email' => 'The :attribute field is not a email address.',
]);
if ($validator->fails())
{
$result = 'errorSubscribe';
$message = 'Opps Please try again.';
}
else
{
//
Mail::to('newsletter.cri@coreality-inc.com')->send(
new SubscripeionMail($subscribeInquery)
);
$result = 'successSubscribe';
$message = 'We have received your subscribe inquiry';
}
}
catch (Exception $ex)
{
$result = 'errorSubscribe';
$message = 'Opps Please try again.';
}
}
if ($message != '')
{
return redirect()->back()->with($result, $message);
}
else
return redirect()->back();
}
}

View File

@ -0,0 +1,56 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests\LoginRequest;
use Illuminate\Support\Facades\Auth;
class LoginController extends Controller
{
/**
* Display login page.
*
* @return Renderable
*/
public function show()
{
return view('auth.login');
}
/**
* Handle account login request
*
* @param LoginRequest $request
*
* @return \Illuminate\Http\Response
*/
public function login(LoginRequest $request)
{
$credentials = $request->getCredentials();
if(!Auth::validate($credentials)):
return redirect()->to('login')
->withErrors(trans('auth.failed'));
endif;
$user = Auth::getProvider()->retrieveByCredentials($credentials);
Auth::login($user);
return $this->authenticated($request, $user);
}
/**
* Handle response after user authenticated
*
* @param Request $request
* @param Auth $user
*
* @return \Illuminate\Http\Response
*/
protected function authenticated(Request $request, $user)
{
return redirect()->intended();
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class LogoutController extends Controller
{
/**
* Log out account user.
*
* @return \Illuminate\Routing\Redirector
*/
public function perform()
{
Session::flush();
Auth::logout();
return redirect('login');
}
}

View File

@ -19,12 +19,8 @@ class ProductsController extends Controller
$pageOffset = $perPageItems * ($page - 1);
$productRows = \App\Models\Product::where('is_front_show', '=', true)
->orderByRaw("CASE
WHEN tip = 'none' THEN 1
WHEN tip = 'new' THEN 2
WHEN tip = 'on_sale' THEN 3
END DESC")
->orderBy('id', 'DESC');
->orderByRaw("CASE WHEN tip LIKE 'on_sale' THEN 1 WHEN tip LIKE 'new' THEN 2 ELSE 3 END");
//->orderBy('id', 'DESC');
$dataCatalogs = \App\Models\ProductCatalog::where('is_front_show', '=', true)
->orderBy('lft', 'asc')
@ -61,7 +57,9 @@ class ProductsController extends Controller
$productCount = $productRows->count();
$productRows = $productRows->skip($pageOffset)->take($perPageItems)->get();
$productRows = $productRows->skip($pageOffset)->take($perPageItems);
//var_dump($productRows->toSql());
$productRows = $productRows->get();
foreach ($productRows as $row)
{
$row->{'applications'} = \App\Models\Product::find($row->id)->productApplications()->get();
@ -105,6 +103,7 @@ class ProductsController extends Controller
'catalogName' => $catalogName,
'catalogSlug' => $catalogSlug,
'productApplications' => $dataRow->productApplications()->get(),
'productRelateds' => $dataRow->productRelateds()->get(),
]);
}

View File

@ -0,0 +1,36 @@
<?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use App\Http\Requests\RegisterRequest;
class RegisterController extends Controller
{
/**
* Display register page.
*
* @return \Illuminate\Http\Response
*/
public function show()
{
return view('auth.register');
}
/**
* Handle account registration request
*
* @param RegisterRequest $request
*
* @return \Illuminate\Http\Response
*/
public function register(RegisterRequest $request)
{
$user = User::create($request->validated());
auth()->login($user);
return redirect('/')->with('success', "Account successfully registered.");
}
}

View File

@ -32,7 +32,7 @@ class SupportDistributionPartnersController extends Controller
$dataRows = \App\Models\SupportDistributionPartner::where('support_distribution_partner_catalog_id', '=', $catalogId)
->where('is_front_show', '=', true)
->orderBy('title', 'desc')
->orderBy('title', 'asc')
->select('id', 'title', 'description', 'photos', 'website');
return view('support-distribution-partners', [

View File

@ -21,10 +21,19 @@ class SupportEcosystemPartnersController extends Controller
->orderBy('lft', 'asc')
->orderBy('id', 'desc')
->select('id', 'name');
if ($catalogId == 0)
{
$catalogRowsGet = $catalogRows->get();
foreach ($catalogRowsGet as $row)
{
$catalogId = $row->id;
break;
}
}
$dataRows = \App\Models\SupportEcosystemPartner::where('support_ecosystem_partner_catalog_id', '=', $catalogId)
->where('is_front_show', '=', true)
->orderBy('title', 'desc')
->orderBy('title', 'asc')
->select('id', 'title', 'description', 'photos', 'website');
return view('support-ecosystem-partners', [

View File

@ -5,16 +5,26 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use \App\Http\Requests\SupportSaleRequest;
use Carbon\Carbon;
use Illuminate\Support\Facades\Mail;
use App\Mail\SalesInquiryMail;
class SupportSalesInquiryController extends Controller
{
public function index(Request $request)
{
$product = '';
$pid = $request->get('pid');
$product = \App\Models\Product::where('id', '=', $pid)->where('is_front_show', '=', true)->first();
if ($product)
if ($pid > 0)
{
$product = 'I am interested in ' . $product->title;
$product = \App\Models\Product::where('id', '=', $pid)->where('is_front_show', '=', true)->first();
if ($product)
{
$product = 'I am interested in ' . $product->title;
}
}
else if ($request->has('comment'))
{
$product = $request->get('comment');
}
return view('support-sales-inquiry',[
'productName' => $product,
@ -34,6 +44,28 @@ class SupportSalesInquiryController extends Controller
'comments' => $request->input('comments'),
'created_at' => Carbon::now(),
]);
try
{
$data = 'First Name: ' . $request->input('name_first') . "\n";
$data .= 'Last Name: ' . $request->input('name_last') . "\n";
$data .= 'Company Name: ' . $request->input('company_name') . "\n";
$data .= 'Job Title: ' . $request->input('job_title') . "\n";
$data .= 'Email: ' . $request->input('email') . "\n";
$data .= 'Phone: ' . $request->input('phone') . "\n";
$data .= 'Contry: ' . $request->input('contry') . "\n";
$data .= 'Comments: ' . $request->input('comments') . "\n";
$data .= 'Created At ' . Carbon::now() . "\n";
Mail::to('sales.cri@coreality-inc.com')->send(
new SalesInquiryMail($data)
);
}
catch (Exception $ex)
{
}
return redirect()->back()->with('success', 'We have received your sales inquiry');
}
}

View File

@ -5,6 +5,8 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use \App\Http\Requests\SupportTechnicalRequest;
use Carbon\Carbon;
use Illuminate\Support\Facades\Mail;
use App\Mail\CustomerServiceMail;
class SupportTechnicalController extends Controller
{
@ -26,6 +28,27 @@ class SupportTechnicalController extends Controller
'comments' => $request->input('comments'),
'created_at' => Carbon::now(),
]);
return redirect()->back()->with('success', 'We have received your technical inquiry');
try
{
$data = 'First Name: ' . $request->input('name_first') . "\n";
$data .= 'Last Name: ' . $request->input('name_last') . "\n";
$data .= 'Company Name: ' . $request->input('company_name') . "\n";
$data .= 'Job Title: ' . $request->input('job_title') . "\n";
$data .= 'Email: ' . $request->input('email') . "\n";
$data .= 'Phone: ' . $request->input('phone') . "\n";
$data .= 'Contry: ' . $request->input('contry') . "\n";
$data .= 'Comments: ' . $request->input('comments') . "\n";
$data .= 'Created At ' . Carbon::now() . "\n";
Mail::to('service.cri@coreality-inc.com')->send(
new CustomerServiceMail($data)
);
}
catch (Exception $ex)
{
}
return redirect()->back()->with('success', 'We have received your customer sercvice inquiry');
}
}

View File

@ -22,6 +22,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\Spatie\CookieConsent\CookieConsentMiddleware::class,
\App\Http\Middleware\AddCspNonceToScripts::class,
];
/**

View File

@ -0,0 +1,85 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class AddCspNonceToScripts
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
$response = $next($request);
// 只處理 HTML 響應
if ($response->headers->get('Content-Type') === 'text/html; charset=UTF-8') {
$content = $response->getContent();
// 儲存提取出的樣式內容
$styles = [];
$styleCounter = 0;
// 第一步:處理內聯樣式,將 style 轉換為 class
$content = preg_replace_callback(
'/<([a-z][a-z0-9]*)\b([^>]*)style=["\']([^"\']+)["\']([^>]*)>/i',
function ($matches) use (&$styles, &$styleCounter) {
$tag = $matches[1]; // 標籤名稱,例如 div
$beforeAttrs = trim($matches[2]); // style 前的屬性
$styleContent = $matches[3]; // 內聯樣式內容
$afterAttrs = trim($matches[4]); // style 後的屬性
// 生成唯一的 class 名稱
$className = 'inline-style-' . $styleCounter++;
$styles[$className] = $styleContent;
// 組合新的標籤,保留其他屬性並添加 class
$newAttrs = $beforeAttrs . ($beforeAttrs ? ' ' : '') . 'class="' . $className . '"' . ($afterAttrs ? ' ' : '') . $afterAttrs;
return '<' . $tag . ' ' . trim($newAttrs) . '>';
},
$content
);
// 第二步:為 <script> 和 <style> 標籤添加 nonce
$content = preg_replace_callback(
'/<(script|style)\b([^>]*)>(.*?)<\/\1>/is',
function ($matches) {
$tag = $matches[1];
$attributes = $matches[2];
$contentInside = $matches[3];
if (strpos($attributes, 'nonce=') !== false) {
return $matches[0];
}
$nonce = csp_nonce();
return '<' . $tag . ' ' . $attributes . ' nonce="' . $nonce . '">' . $contentInside . '</' . $tag . '>';
},
$content
);
// 第三步:將提取的樣式追加為 <style> 標籤
if (!empty($styles)) {
$styleBlock = '<style nonce="' . csp_nonce() . '">' . PHP_EOL;
foreach ($styles as $className => $styleContent) {
$styleBlock .= '.' . $className . ' {' . $styleContent . '}' . PHP_EOL;
}
$styleBlock .= '</style>';
// 將樣式塊插入到 </head> 之前(如果有 head否則插入到文件末尾
$content = str_contains($content, '</head>')
? str_replace('</head>', $styleBlock . '</head>', $content)
: $content . $styleBlock;
}
$response->setContent($content);
}
return $response;
}
}

View File

@ -0,0 +1,71 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
class LoginRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'username' => 'required',
'password' => 'required'
];
}
/**
* Get the needed authorization credentials from the request.
*
* @return array
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function getCredentials()
{
// The form field for providing username or password
// have name of "username", however, in order to support
// logging users in with both (username and email)
// we have to check if user has entered one or another
$username = $this->get('username');
if ($this->isEmail($username)) {
return [
'email' => $username,
'password' => $this->get('password')
];
}
return $this->only('username', 'password');
}
/**
* Validate if provided parameter is valid email.
*
* @param $param
* @return bool
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
private function isEmail($param)
{
$factory = $this->container->make(ValidationFactory::class);
return ! $factory->make(
['username' => $param],
['username' => 'email']
)->fails();
}
}

View File

@ -3,6 +3,7 @@
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Request;
class ProductApplicationRequest extends FormRequest
{
@ -24,8 +25,9 @@ class ProductApplicationRequest extends FormRequest
*/
public function rules()
{
$slug = request()->post('slug');
return [
'slug' => 'required|unique:product_applications,slug',
'slug' => 'required|unique:product_applications,slug,'.$this->id.',id',
];
}

View File

@ -25,7 +25,7 @@ class ProductCatalogRequest extends FormRequest
public function rules()
{
return [
'slug' => 'required|unique:product_catalogs,slug',
'slug' => 'required|unique:product_catalogs,slug,'.$this->id.',id',
];
}

View File

@ -25,7 +25,7 @@ class ProductRequest extends FormRequest
public function rules()
{
return [
// 'slug' => 'required|unique:products,slug',
'slug' => 'required|unique:product_catalogs,slug,'.$this->id.',id',
];
}

View File

@ -0,0 +1,33 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RegisterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'email' => 'required|email:rfc,dns|unique:users,email',
//'username' => 'required|unique:users,username',
'password' => 'required|min:8',
'password_confirmation' => 'required|same:password',
'name' => 'required',
'phone' => 'required',
];
}
}

View File

@ -14,7 +14,8 @@ class SupportSaleRequest extends FormRequest
public function authorize()
{
// only allow updates if the user is logged in
return backpack_auth()->check();
//return backpack_auth()->check();
return true;
}
/**

View File

@ -14,7 +14,8 @@ class SupportTechnicalRequest extends FormRequest
public function authorize()
{
// only allow updates if the user is logged in
return backpack_auth()->check();
//return backpack_auth()->check();
return true;
}
/**

View File

@ -0,0 +1,55 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class CustomerServiceMail extends Mailable
{
use Queueable, SerializesModels;
public $data;
/**
* Create a new message instance.
*/
public function __construct($data)
{
$this->data = $data;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Customer Service Mail',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.customer_service',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@ -0,0 +1,55 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class SalesInquiryMail extends Mailable
{
use Queueable, SerializesModels;
public $data;
/**
* Create a new message instance.
*/
public function __construct($data)
{
$this->data = $data;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Sales Inquiry Mail',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.sales_inquery',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@ -0,0 +1,55 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class SubscripeionMail extends Mailable
{
use Queueable, SerializesModels;
public $data;
/**
* Create a new message instance.
*/
public function __construct($data)
{
$this->data = $data;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Subscripeion Mail',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.subscribe_inquery',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@ -30,6 +30,7 @@ class Event extends Model
public $translatable = ['title', 'body', 'venue', 'contact', 'seo_keyword', 'seo_description'];
protected $casts = [
'post_at' => 'datetime',
'event_at' => 'datetime',
'photos' => 'array',
];
/*

View File

@ -30,6 +30,7 @@ class HomeCarousel extends Model
public $translatable = ['title','body'];
protected $casts = [
'photos' => 'array',
'featured_photos' => 'array',
];
/*
@ -40,13 +41,28 @@ class HomeCarousel extends Model
public static function boot()
{
parent::boot();
static::creating(function ($model) {
$limit = 6;
$actualCount = HomeCarousel::query()->count();
if ($actualCount >= $limit) {
return false;
}
});
static::deleting(function($obj) {
if (count((array)$obj->photos)) {
foreach ($obj->photos as $item) {
\Storage::disk('public')->delete($item['file_path']);
}
}
if (count((array)$obj->featured_photos)) {
foreach ($obj->featured_photos as $item) {
\Storage::disk('public')->delete($item['file_path']);
}
}
});
}
/*
|--------------------------------------------------------------------------
@ -85,6 +101,14 @@ class HomeCarousel extends Model
$disk = "public";
$destination_path = "home_carousel";
$this->uploadImgMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);
}
public function setFeaturedPhotosAttribute($value)
{
$attribute_name = "featured_photos";
$disk = "public";
$destination_path = "home_carousel";
$this->uploadImgMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);
}
}

View File

@ -27,7 +27,7 @@ class Product extends Model
protected $guarded = ['id'];
// protected $fillable = [];
// protected $hidden = [];
public $translatable = ['title', 'tip', 'description', 'body', 'feature_overview', 'feature_spec', 'seo_keyword', 'seo_description'];
public $translatable = ['title', 'description', 'body', 'feature_overview', 'feature_spec', 'seo_keyword', 'seo_description'];
protected $casts = [
'photos' => 'array',
];
@ -53,6 +53,11 @@ class Product extends Model
| RELATIONS
|--------------------------------------------------------------------------
*/
public function productRelateds()
{
return $this->belongsToMany(Product::class, 'product_product_related', 'product_id', 'product_related_id');
}
public function productCatalog()
{
return $this->belongsTo(ProductCatalog::class, 'product_catalog_id');

View File

@ -24,6 +24,10 @@ class User extends Authenticatable
'name',
'email',
'password',
'phone',
'country',
'company',
'job_title',
];
/**

View File

@ -0,0 +1,43 @@
<?php
namespace App\Support;
use Spatie\Csp\Directive;
use Spatie\Csp\Policies\Basic;
class MyCustomPolicy extends Basic
{
public function configure()
{
parent::configure();
$this->addDirective(Directive::FRAME, [
//\Spatie\Csp\Keyword::UNSAFE_INLINE,
\Spatie\Csp\Keyword::SELF,
//\Spatie\Csp\Keyword::UNSAFE_HASHES,
'www.google.com'
]);
$this->addDirective(Directive::STYLE, [
//\Spatie\Csp\Keyword::UNSAFE_INLINE,
\Spatie\Csp\Keyword::SELF,
//\Spatie\Csp\Keyword::UNSAFE_HASHES,
'fonts.googleapis.com'
]);
$this->addDirective(Directive::SCRIPT, [
// \Spatie\Csp\Keyword::UNSAFE_INLINE,
\Spatie\Csp\Keyword::SELF,
//\Spatie\Csp\Keyword::UNSAFE_HASHES,
'fonts.googleapis.com'
]);
$this->addDirective(Directive::FONT, [
\Spatie\Csp\Keyword::STRICT_DYNAMIC,
\Spatie\Csp\Keyword::SELF,
'fonts.gstatic.com'
]);
$this->addDirective(Directive::IMG, [
\Spatie\Csp\Keyword::STRICT_DYNAMIC,
\Spatie\Csp\Keyword::SELF,
'data:'
]);
$this->addNonceForDirective(Directive::SCRIPT)
->addNonceForDirective(Directive::STYLE);
}
}

View File

@ -20,6 +20,7 @@
"laravel/tinker": "^2.8",
"petercoles/multilingual-country-list": "^1.2",
"spatie/laravel-cookie-consent": "^3.2",
"spatie/laravel-csp": "^2.10",
"spatie/laravel-translatable": "^6.5"
},
"require-dev": {

88
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "b261920d908ed479dde8d92e244478ad",
"content-hash": "2e12e7ffe146020a60ac3a4c9279457d",
"packages": [
{
"name": "backpack/basset",
@ -5069,6 +5069,88 @@
],
"time": "2023-01-25T09:18:22+00:00"
},
{
"name": "spatie/laravel-csp",
"version": "2.10.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-csp.git",
"reference": "ea7d2859a2617954df869e816b0f740400184ae0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-csp/zipball/ea7d2859a2617954df869e816b0f740400184ae0",
"reference": "ea7d2859a2617954df869e816b0f740400184ae0",
"shasum": ""
},
"require": {
"illuminate/http": "^9.0|^10.0|^11.0",
"illuminate/support": "^9.0|^10.0|^11.0",
"php": "^8.1",
"spatie/laravel-package-tools": "^1.11"
},
"require-dev": {
"mockery/mockery": "^1.3.3",
"orchestra/testbench": "^7.0|^8.0|^9.0",
"pestphp/pest": "^1.23.0|^2.34.0",
"roave/security-advisories": "dev-master"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\Csp\\CspServiceProvider"
]
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\Csp\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Thomas Verhelst",
"email": "tvke91@gmail.com",
"homepage": "https://spatie.be",
"role": "Developer"
},
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Add CSP headers to the responses of a Laravel app",
"homepage": "https://github.com/spatie/laravel-csp",
"keywords": [
"content-security-policy",
"csp",
"headers",
"laravel",
"laravel-csp",
"security",
"spatie"
],
"support": {
"source": "https://github.com/spatie/laravel-csp/tree/2.10.1"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2024-09-20T13:39:37+00:00"
},
{
"name": "spatie/laravel-package-tools",
"version": "1.16.2",
@ -11087,12 +11169,12 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.1"
},
"platform-dev": [],
"platform-dev": {},
"plugin-api-version": "2.6.0"
}

View File

@ -62,14 +62,14 @@ return [
/**
* The color mode used by default.
*/
'defaultColorMode' => 'system', // system, light, dark
'defaultColorMode' => 'light', // system, light, dark
/**
* When true, a switch is displayed to let admins choose their favorite theme mode.
* When false, the theme will only use the "defaultColorMode" set above.
* In case "defaultColorMode" is null, system is the default.
*/
'showColorModeSwitcher' => true,
'showColorModeSwitcher' => false,
/**
* Fix the top-header component (present in "vertical_transparent") and the menu when the layout type is set as "horizontal".

35
config/csp.php Normal file
View File

@ -0,0 +1,35 @@
<?php
return [
/*
* A policy will determine which CSP headers will be set. A valid CSP policy is
* any class that extends `Spatie\Csp\Policies\Policy`
*/
//'policy' => Spatie\Csp\Policies\Basic::class,
'policy' => App\Support\MyCustomPolicy::class,
/*
* This policy which will be put in report only mode. This is great for testing out
* a new policy or changes to existing csp policy without breaking anything.
*/
'report_only_policy' => '',
/*
* All violations against the policy will be reported to this url.
* A great service you could use for this is https://report-uri.com/
*
* You can override this setting by calling `reportTo` on your policy.
*/
'report_uri' => env('CSP_REPORT_URI', ''),
/*
* Headers will only be added if this setting is set to true.
*/
'enabled' => env('CSP_ENABLED', true),
/*
* The class responsible for generating the nonces used in inline tags and headers.
*/
'nonce_generator' => Spatie\Csp\Nonce\RandomString::class,
];

View File

@ -18,6 +18,7 @@ class CreateEventsTable extends Migration
$table->boolean('is_front_show')->default(true);
$table->dateTime('post_at')->useCurrent();
$table->text('venue')->nullable();
$table->dateTime('event_at')->useCurrent();
$table->text('contact')->nullalbe();
$table->text('seo_title')->nullable();
$table->text('seo_keyword')->nullable();

View File

@ -23,6 +23,7 @@ class CreateHomeCarouselTable extends Migration
$table->text('body');
$table->text('link')->nullable();
$table->string('link_target')->nullable();
$table->text('featured_photos');
$table->text('photos');
$table->timestamps();
});

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateProductProductRelatedPivotTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_product_related', function (Blueprint $table) {
$table->unsignedBigInteger('product_id')->index();
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
$table->unsignedBigInteger('product_related_id')->index();
$table->foreign('product_related_id')->references('id')->on('products')->onDelete('cascade');
$table->primary(['product_id', 'product_related_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('product_product_related');
}
}

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('phone')->nullable()->after('password');
$table->string('country')->nullable()->after('phone');
$table->string('company')->nullable()->after('country');
$table->string('job_title')->nullable()->after('company');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('phone');
$table->dropColumn('country');
$table->dropColumn('company');
$table->dropColumn('job_title');
});
}
};

View File

@ -26,6 +26,15 @@ return [
'feature_spec' => 'Specifications',
'photos' => 'Photos',
'slug' => 'Slug',
'product_related' => 'Product Related',
'company' => 'Company',
'phone' => 'Phone',
'job_title' => 'Job Title',
'country' => 'Country',
'feature_resource' => 'Resource',
'feature_related_part' => 'Related Part',
'featured_img' => 'Featured Image',
'event_at' => 'Event Datetime',
],
'account' => [
'title' => 'Account',
@ -42,7 +51,7 @@ return [
'home_carousel' => [
'title' => 'Home Carousel Manage',
'content' => [
'ttile' => 'Home Carousel',
'title' => 'Home Carousel',
'item' => 'Carousel Item',
'items' => 'Carousel Items'
],

View File

@ -4,7 +4,35 @@ declare(strict_types=1);
return [
'columnName' => [
'seo_keyword' => 'SEO Keyword',
'seo_description' => 'SEO Description',
'name' => '名稱',
'catalog' => '分類',
'application' => '應用',
'is_front_show' => '前台顯示',
'post_at' => '發佈時間',
'title' => '標題',
'body' => '內文',
'description' => '短述',
'venue' => '地點',
'contact' => '聯絡方式',
'source_links' => '來源連結',
'cover' => '封面',
'website' => '網站連結',
'link' => '連結',
'link_target' => '連結目標',
'tip' => '提示',
'feature_overview' => '概觀',
'feature_spec' => '規格',
'photos' => '圖片',
'slug' => 'Slug',
'product_related' => '相關產品',
'company' => '公司',
'phone' => '電話',
'job_title' => '職稱',
'country' => '國家/地區',
'feature_resource' => '資源',
'feature_related_part' => '相關部份',
],
'account' => [
'title' => '帳戶',
@ -18,22 +46,100 @@ return [
'title' => '權限管理',
],
],
'home_carousel' => [
'title' => '首頁輪播管理',
'content' => [
'title' => '首頁輪播',
'item' => '首頁輪播項目',
'items' => '輪播項目'
],
],
'news' => [
'title' => '新聞管理',
'catalog' => [
'title' => '新聞分類',
'title' => '類',
'item' => '新聞類別',
'items' => '新聞類別',
],
'article' => [
'title' => '文章管理',
'content' => [
'title' => '新聞',
'item' => '新聞',
'items' => '新聞',
],
],
'event' => [
'title' => '活動管理',
'catalog' => [
'title' => '活動分類',
'title' => '分類',
'item' => '活動分類',
'items' => '活動分類',
],
'article' => [
'title' => '活動管理',
'content' => [
'title' => '活動',
'item' => '活動',
'items' => '活動',
],
],
'product' => [
'title' => '產品管理',
'catalog' => [
'title' => '分類',
'item' => '產品分類',
'items' => '產品分類',
],
'application' => [
'title' => '應用',
'item' => '產品應用',
'items' => '產品應用',
],
'content' => [
'title' => '產品',
'item' => '產品',
'items' => '產品',
],
'tip_options' => [
'none' => '無',
'new' => 'New',
'on_sale' => 'On Sale',
]
],
'support' => [
'title' => '支援管理',
'technical' => [
'title' => '技術支援',
'item' => '技術支援',
'items' => '技術支援',
],
'sales_inquiry' => [
'title' => ' 銷售需求',
'item' => '銷售需求',
'items' => '銷售需求',
],
'distribution_partner' => [
'title' => '經銷合作夥伴',
'catalog' => [
'title' => '分類',
'item' => '經銷合作夥伴分類',
'items' => '經銷合作夥伴分類',
],
'content' => [
'title' => '經銷合作夥伴',
'item' => '經銷合作夥伴',
'items' => '經銷合作夥伴',
],
],
'ecosystem_partner' => [
'title' => '生態系合作夥伴',
'catalog' => [
'title' => '分類',
'item' => '生態系合作夥伴分類',
'items' => '生態系合作夥伴分類',
],
'content' => [
'title' => '生態系合作夥伴',
'item' => '生態系合作夥伴',
'items' => '生態系合作夥伴',
],
],
],
];

View File

@ -27,21 +27,21 @@
.carousel-intro .carousel-caption h2 {
display: inline-block;
color: #fff;
font-size: 1rem;
font-size: 1.3rem;
/* text-shadow: 1px 1px 1px #fff;*/
font-weight: bold;
margin: 0 0 20px 0;
padding: 0;
line-height: 24px;
line-height: 28px;
}
.carousel-intro .carousel-caption p {
color: #fff;
font-size: 0.6rem;
font-size: 1rem;
/* text-shadow: 1px 1px 1px #333; */
font-weight: normal;
margin: 0 0 20px 0;
padding: 0;
line-height: 16px;
line-height: 18px;
}
.carousel-intro .carousel-caption a {
@ -98,6 +98,11 @@
background-color: #e27a14;
}
.caption-img {
text-align: center;
}
/*========================================================
@ -138,54 +143,60 @@
/*========================================================
尺寸設定
=========================================================*/
@media (max-width: 479px) {
.carousel-intro .carousel-item img {
height: 240px;
}
}
@media (min-width: 480px) and (max-width: 767px) {
.carousel-intro .carousel-item img {
height: 320px;
}
}
@media (max-width: 767px) {
.carousel-intro .carousel-item img {
object-fit: cover;
object-position: center center;
.carousel-intro .carousel-item > img {
height: 420px;
}
.carousel-intro .carousel-caption p {
display: none;
}
}
@media (min-width: 480px) and (max-width: 767px) {
.carousel-intro .carousel-item > img {
height: 600px;
}
}
@media (max-width: 767px) {
.carousel-intro .carousel-item > img {
object-fit: cover;
object-position: center center;
}
.caption-img img {
max-width: 50%;
max-height: 45%;
margin-top: 30px;
}
}
@media (min-width: 768px) {
.carousel-intro .carousel-caption {
text-align: left;
}
.carousel-intro .carousel-caption h2 {
font-size: 1.4rem;
line-height: 28px;
}
.carousel-intro .carousel-caption p {
font-size: 0.8rem;
font-size: 1rem;
line-height: 20px;
}
.carousel-intro .carousel-caption a {
padding: 10px 30px;
border-radius: 30px;
}
.caption-img img {
max-height: 60vh;
}
}
@media (min-width: 992px) {
.carousel-intro .carousel-caption {
top: 50%;
left: 20%;
transform: translate(-20%,-50%);
text-align: left;
width: 40%;
width: 70%;
}
.carousel-intro .carousel-caption h2 {
font-size: 1.4rem;
font-size: 1.6rem;
line-height: 30px;
}
.carousel-intro .carousel-caption p {
font-size: 0.8rem;
font-size: 0.9rem;
line-height: 24px;
}
.carousel-control-prev-icon,
@ -200,20 +211,20 @@
line-height: 36px;
}
.carousel-intro .carousel-caption p {
font-size: 0.9rem;
font-size: 1rem;
line-height: 24px;
}
}
@media (min-width: 1600px) {
.carousel-intro .carousel-caption {
width: 25%;
width: 70%;
}
.carousel-intro .carousel-caption h2 {
font-size: 2.2rem;
font-size: 2rem;
line-height: 40px;
}
.carousel-intro .carousel-caption p {
font-size: 1rem;
font-size: 1.1rem;
line-height: 28px;
}
.carousel-indicators {
@ -286,11 +297,6 @@
object-fit: cover;
}
}
@media (min-width: 768px) {
.carousel-intro .carousel-caption h2 {
font-size: 1.6rem;
}
}
@media (min-width: 992px) {
.page-banner-caption {
left: 16vw;

View File

@ -130,7 +130,7 @@ footer a:hover {
}
@media (min-width: 1600px) {
.footer-contacts-logo img {
height: 54px;
height: 50px;
}
}

View File

@ -267,12 +267,21 @@ body {
color: #000;
}
}
@media (min-width: 1200px) {
.rd-navbar-static .rd-navbar-nav > li > a,
.rd-navbar-fullwidth .rd-navbar-nav > li > a {
font-size: 1.2rem;
margin: 0 15px;
}
}
@media (min-width: 1600px) {
.rd-navbar-brand img {
height: 65px;
height: 50px;
}
.rd-navbar-static .rd-navbar-nav > li > a,
.rd-navbar-fullwidth .rd-navbar-nav > li > a {
font-size: 1.3rem;
margin: 0 20px;
}
}

View File

@ -216,15 +216,23 @@ body {
font-size: 0.8rem;
}
}
@media (min-width: 1200px) {
.rd-navbar-static .rd-navbar-nav > li > a,
.rd-navbar-fullwidth .rd-navbar-nav > li > a {
font-size: 1.2rem;
margin: 0 15px;
}
}
@media (min-width: 1600px) {
body {
padding-top: 145px;
padding-top: 130px;
}
.rd-navbar-brand img {
height: 65px;
height: 50px;
}
.rd-navbar-static .rd-navbar-nav > li > a,
.rd-navbar-fullwidth .rd-navbar-nav > li > a {
font-size: 1.3rem;
margin: 0 20px;
}
.rd-navbar-info {

View File

@ -166,11 +166,11 @@
background: linear-gradient(to bottom, #2fe49e 0%,#2087a3 100%);
}
@media (min-width: 1200px) {
/*@media (min-width: 1200px) {
.service-wrap {
padding-top: 100px;
}
}
}*/
@ -214,14 +214,15 @@
margin: 0;
color: #333;
}
.news-item p a {
.news-item h5 a {
display: block;
color: #000;
font-weight: bold;
position: relative;
padding-right: 60px;
font-size: 1.1rem;
}
.news-item p a:after {
.news-item h5 a:after {
font-family: 'Font Awesome 5 free';
content: "\f0a9";
font-weight: 900;
@ -234,10 +235,10 @@
color: #2bb39b;
font-size: 1.8rem;
}
.news-item p a:hover:after {
.news-item h5 a:hover:after {
color: #3363cb;
}
.news-item h4 a:hover,
.news-item h5 a:hover,
.news-item p a:hover {
color: #123c82;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
About Us -
About Us -
@endsection
@section('seo_keywords')
@ -43,20 +43,21 @@
</div>
<a style="position: relative; top: -100px;"></a>
<div id="anchor-about02" data-type="anchor" class="mb-5">
<a id="anchor-about02" style="position: relative; top: -100px;"></a>
<div class="mb-5">
<h2 class="h2-title">Contact Us</h2>
<div class="contact-inner">
<div class="row align-items-center">
<div class="col-lg-6" style="margin-bottom: -10px;">
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d14491.172409946072!2d121.0274549!3d24.768282!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x346849d6072e9c51%3A0xb8aea267e2516407!2z5Lit5by35YWJ6Zu76IKh5Lu95pyJ6ZmQ5YWs5Y-456u556eR5bug!5e0!3m2!1szh-TW!2stw!4v1705549461431!5m2!1szh-TW!2stw" width="100%" height="300" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<div class="col-lg-5" style="margin-bottom: -10px;">
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d904.1048137881115!2d121.540035!3d24.985866!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x346801fecc279587%3A0xb0849a98193cc084!2sNo.%20225%2C%20Section%203%2C%20Beixin%20Rd%2C%20Xindian%20District%2C%20New%20Taipei%20City%2C%20231!5e0!3m2!1sen!2stw!4v1713162069503!5m2!1sen!2stw" width="100%" height="300" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
<div class="col-lg-6">
<div class="col-lg-7">
<div class="contact-info">
<h4>Coretronic Reality Inc.</h4>
<ul>
<li><strong>Address</strong><br />
15F, No. 225, Sec. 3, Beixin Rd., Xindian Dist., New Taipei City, Taiwan 23143</li>
(1) Taipei Office15F, No. 225, Sec. 3, Beixin Rd., Xindian Dist., New Taipei City, Taiwan 23143<br />
(2) Hsinchu OfficeNo. 11, Li Hsin Rd, Science Park, Hsinchu City, Taiwan</li>
<li><strong>Email</strong><br />
Technical Supportservice.cri@coreality-inc.com<br />
Sales Enquirysales.cri@coreality-inc.com</li>

View File

@ -0,0 +1,56 @@
@extends('layouts.heading-page')
@section('title')
News -
@endsection
@section('seo_keywords')
@endsection
@section('seo_description')
@endsection
@section('css')
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
Members
@endsection
@section('page-main')
<!-- 資料內容 -->
<div class="content-wrap member-wrap">
<div class="container">
<form id="form" class="form-horizontal" method="post" action="{{ route('login.perform') }}">
@csrf
<div class="member-form">
<h2><i class="fa-solid fa-user"></i> Member Login</h2>
<div class="box">
<input type="text" class="form-control" id="email" placeholder="Email" name="email">
<i class="fa-solid fa-envelope"></i>
</div>
<div class="box">
<input type="password" class="form-control" id="pass" placeholder="Password" name="password">
<i class="fa-solid fa-key"></i>
</div>
<!--<div class="clearfix remember-box">
<a href="/member/forgot-password"><i class="fa-regular fa-lightbulb"></i> Forget the password</a>
</div>-->
<div class="member-btn">
<a href="javascript:{}" onclick="document.getElementById('form').submit();">Login</a>
<!--<a href="/member/register">Sign Up</a>-->
</div>
</div>
</form>
</div>
</div>
@endsection
@section('script')
<script type="text/javascript">
</script>
@endsection

View File

@ -1,17 +1,17 @@
<div class="rd-navbar-nav-wrap">
<div class="rd-navbar-info">
<ul class="other-link">
<li><a href="#" data-toggle="modal" data-target="#exampleModalCenter"><i class="fa-solid fa-magnifying-glass"></i></a></li>
<li><a href="#"><i class="fa-regular fa-user"></i></a></li>
<li><a href="#"><i class="fa-solid fa-bag-shopping"></i></a></li>
<!--<li><a href="#" data-toggle="modal" data-target="#exampleModalCenter"><i class="fa-solid fa-magnifying-glass"></i></a></li>-->
<li><a href="/member/login"><i class="fa-regular fa-user"></i></a></li>
<!--<li><a href="#"><i class="fa-solid fa-bag-shopping"></i></a></li>-->
</ul>
</div>
<ul class="rd-navbar-nav">
<li class="{{ Route::is('') ?? 'active' }}" ><a href="/">Home</a></li>
<li class="{{ Route::is('products', 'products/*') ? 'active' : '' }}"><a href="/products">Products</a></li>
<li class="{{ Route::is('support', 'support/*') ? 'active' : '' }}"><a href="/support/technical">Support</a>
<li class="{{ Route::is('support', 'support/*') ? 'active' : '' }}"><a href="/support/customer">Support</a>
<ul class="rd-navbar-dropdown">
<li class="{{ Route::is('support/technical', 'support/technical/*') ? 'active' : '' }}"><a href="/support/technical">Technical Support</a></li>
<li class="{{ Route::is('support/customer', 'support/customer/*') ? 'active' : '' }}"><a href="/support/customer">Customer Service</a></li>
<li class="{{ Route::is('support/sales-inquiry', 'support/sales-inquiry/*') ? 'active' : '' }}"><a href="/support/sales-inquiry">Sales Inquiry</a></li>
<li class="{{ Route::is('support/distribution-partners', 'support/distribution-partners/*') ? 'active' : '' }}"><a href="/support/distribution-partners">Distribution Partners</a></li>
<li class="{{ Route::is('support/ecosystem-partners', 'support/ecosystem-partners/*') ? 'active' : '' }}"><a href="/support/ecosystem-partners">Ecosystem Partners</a></li>

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
Events -
Events -
@endsection
@section('seo_keywords')
@ -11,7 +11,7 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
@ -53,9 +53,9 @@
<div class="post-body">
<h2><a href="/events/detail/{{ $row->id }}">{{ $row->title }}</a></h2>
<div class="post-text">
<p><span>Date: </span>{{ date('Y-m-d', strtotime($row->post_at)) }}</p>
<p><span>Date: </span>{{ date('Y-m-d', strtotime($row->event_at)) }}</p>
<p><span>Venue: </span>{{ $row->venue }}</p>
<p><span>Contact Us: </span>{{ $row->contact }}</p>
<p><span>Contact: </span>{{ $row->contact }}</p>
</div>
<div class="more"><a href="/events/detail/{{ $row->id }}">More</a></div>
</div>

View File

@ -1,19 +1,19 @@
@extends('layouts.heading-page')
@section('title')
News -
Event -
@endsection
@section('seo_keywords')
{{ $dataRow->seo_keyword }}
{{ $dataRow->seo_keyword }}
@endsection
@section('seo_description')
{{ $dataRow->seo_description }}
{{ $dataRow->seo_description }}
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
@ -30,9 +30,9 @@
<div class="news-info">
<h3 class="news-detail-title">{{ $dataRow->title }}</h3>
<ul>
<li><span>Date: </span>{{ date('Y-m-d', strtotime($dataRow->post_at)) }}</li>
<li><span>Date: </span>{{ date('Y-m-d', strtotime($dataRow->event_at)) }}</li>
<li><span>Venue: </span>{{ $dataRow->venue }}</li>
<li><span>Contact Us: </span>{{ $dataRow->contact }}</li>
<li><span>Contact: </span>{{ $dataRow->contact }}</li>
</ul>
</div>
<div class="news-detail-content img-style video-iframe">
@ -52,7 +52,9 @@
}
}
@endphp
<!--
<img src="{{ $img_src }}" alt="">
-->
{!! $dataRow->body !!}
</div>
</section>

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-home')
@section('css')
<link href="assets/css/index.css" rel="stylesheet" />
<link href="/assets/css/index.css" rel="stylesheet" />
@endsection
@section('main')
@ -39,13 +39,38 @@
break;
}
}
$img_src2 = '';
$imgs2 = $row->featured_photos;
if ($imgs2 && count($imgs2) > 0)
{
foreach($imgs2 as $img)
{
// $img_memo = $img['comment'];
$img_src2 = URL::asset('/storage/'.$img['file_path']);
break;
}
}
@endphp
<div class="carousel-item {{ $i == 0 ? 'active' : '' }}">
<img src="{{ $img_src }}" alt="" width="100%" height="auto">
<div class="carousel-caption">
<h2 class="animate__animated animate__fadeInUp">{{ $row->title }}</h2>
<p class="animate__animated animate__fadeInUp">{{ $row->body }}</p>
<div class="animate__animated animate__fadeInUp"><a href="{{ $row->link }}">DETAIL</a></div>
<div class="row align-items-center">
<div class="col-md-6">
<div class="caption-txt">
<h2 class="animate__animated animate__fadeInUp">{{ $row->title }}</h2>
<p class="animate__animated animate__fadeInUp">{{ $row->body }}</p>
<div class="animate__animated animate__fadeInUp"><a href="{{ $row->link }}">DETAIL</a></div>
</div>
</div>
@if ($img_src2 != '')
<div class="col-md-6">
<div class="caption-img">
<img src="{{ $img_src2 }}" alt="" width="auto" height="auto" class="img-fluid">
</div>
</div>
@endif
</div>
</div>
</div>
@php
@ -129,7 +154,8 @@
@endphp
<div class="news-item">
<time>{{ date('Y-m-d', strtotime($row->post_at)) }}</time>
<p><a href="/events/detail/{{ $row->id }}">{{ $row->title }}</a></p>
<h5><a href="/events/detail/{{ $row->id }}">{{ $row->title }}</a></h5>
<p>Date: {{ date('Y-m-d', strtotime($row->event_at)) }}</p>
</div>
@php
$i++;
@ -173,11 +199,6 @@
$i++;
}
@endphp
<div class="news-item">
<time>2024-01-17</time>
<h4><a href="news.php">Cambrios insists on the most powerful patents and defends</a></h4>
<p>2020 is a year full of tests and challenges. The international epidemic ... </p>
</div>
</div>
<div class="news-btn"><a href="/news">More News</a></div>
</div>

View File

@ -14,8 +14,8 @@
<meta name="rating" content="general" />
<meta name="author" content="Coretronic Reality Inc.">
<meta name="copyright" content="Coretronic Reality Inc." />
<link rel="shortcut icon" href="favico.ico"/>
<link rel="bookmark" href="favico.ico"/>
<link rel="shortcut icon" href="/favico.ico"/>
<link rel="bookmark" href="/favico.ico"/>
<title>@yield('title')Coretronic Reality Inc.</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@ -56,9 +56,9 @@
<div class="footer-nav-item">
<h4>GET IN TOUCH</h4>
<ul>
<li><span>Technical Support</span><br /><a href="mailto:service.cri@coreality-inc.com">service.cri@coreality-inc.com</a></li>
<li><span>Customer Service</span><br /><a href="mailto:service.cri@coreality-inc.com">service.cri@coreality-inc.com</a></li>
<li><span>Sales Enquiry</span><br /><a href="mailto:sales.cri@coreality-inc.com">sales.cri@coreality-inc.com</a></li>
<li><a href=""><i class="fa-brands fa-linkedin"></i></a></li>
<li><a href="https://www.linkedin.com/company/coretronic-reality-inc" target="_blank"><i class="fa-brands fa-linkedin"></i></a></li>
</ul>
</div>
<div class="footer-nav-item">
@ -69,20 +69,36 @@
<li><a href="/about#anchor-about02">Contact us</a></li>
</ul>
</div>
<form method="POST" action="/">
@csrf
<div class="footer-nav-item">
<h4>SUBSCRIBE NEWSLETTER</h4>
<p>Get the latest information on company news, <br />product promotions, events. Sign up here:</p>
<input type="text" class="form-control" placeholder="Email Address">
<div class="text-left mt-3"><a href="" class="btn btn-danger btn-sm">SUBSCRIBE</a></div>
<input type="text" class="form-control" name="subscribeInquery" placeholder="Email Address">
<div class="text-left mt-3"><input type="submit" href="" class="btn btn-danger btn-sm" value="SUBSCRIBE"></input></div>
@if ($message = Session::get('errorSubscribe'))
<div class="text-left mt-3 alert alert-block alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ $message }}</strong>
</div>
@endif
@if ($message = Session::get('successSubscribe'))
<div class="text-left mt-3 alert alert-block alert-success ">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ $message }}</strong>
</div>
@endif
</div>
</form>
</div>
</div>
<div class="col-xl-12">
<div class="footer-nav">
<div class="footer-nav-item ml-0 mb-0">
<h4>ADDRESS</h4>
<p>15F, No. 225, Sec. 3, Beixin Rd., Xindian Dist., New Taipei City, Taiwan 23143</p>
<h4>ADDRESS</h4>
<p>(1) Taipei Office15F, No. 225, Sec. 3, Beixin Rd., Xindian Dist., New Taipei City, Taiwan 23143<br />
(2) Hsinchu OfficeNo. 11, Li Hsin Rd, Science Park, Hsinchu City, Taiwan</p>
</div>
</div>
</div>

View File

@ -0,0 +1,5 @@
Hi, Got a customer service from website <br>
<pre>
{{ $data }}
</pre>

View File

@ -0,0 +1,5 @@
Hi, Got a sales inquery from website <br>
<pre>
{{ $data }}
</pre>

View File

@ -0,0 +1,5 @@
Hi, Got a subscribe inquery from website <br>
<div>
email: {{ $data }}
</div>

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
News -
News -
@endsection
@section('seo_keywords')
@ -11,7 +11,7 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
@ -45,9 +45,11 @@
@endphp
<div class="col-xl-4 col-md-6">
<div class="news-item">
<div class="news-item-img">
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
</div>
<div class="news-item-info">
<h4>{{ $row->title }}</h4>
<time><span>News</span>{{ date('Y-m-d', strtotime($row->post_at)) }}</time>

View File

@ -1,19 +1,19 @@
@extends('layouts.heading-page')
@section('title')
News -
News -
@endsection
@section('seo_keywords')
{{ $dataRow->seo_keyword }}
{{ $dataRow->seo_keyword }}
@endsection
@section('seo_description')
{{ $dataRow->seo_description }}
{{ $dataRow->seo_description }}
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
@ -44,7 +44,7 @@
}
}
@endphp
<img src="{{ $img_src }}" alt="">
<!--<img src="{{ $img_src }}" alt="">-->
{!! $dataRow->body !!}
</div>
@php
@ -61,10 +61,9 @@
@endforeach
@endforeach
</div>
@endif
</div>
</section>
<div class="btn-back"><a href="javascript:history.back()"><i class="fa fa-reply"></i> Return to list page</a></div>

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
Products -
Products -
@endsection
@section('seo_keywords')
@ -11,7 +11,7 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
@ -145,14 +145,19 @@
</div>
<div class="col-md-9">
<div class="products-item-info">
<h4><a href="/products/detail/{{ $row->slug }}">{{ $row->title }}<span>{{ trans('backend.product.tip_options.' . $row->tip) }}</span></a></h4>
<h4>
<a href="/products/detail/{{ $row->slug }}">{{ $row->title }}
@if (!!$row->tip && $row->tip != 'none')
<span>{{ trans('backend.product.tip_options.' . $row->tip) }}</span>
@endif
</a></h4>
<p>{{ $row->description }}</p>
<ul class="ul-applications">
@php
foreach ($row->applications as $tag)
{
@endphp
<li><a>{{ $tag->name }}</a></li>
<li><a href="/products?tags={{ $tag->slug }}">{{ $tag->name }}</a></li>
@php
}
@endphp

View File

@ -1,15 +1,15 @@
@extends('layouts.heading-page')
@section('title')
Products -
Products -
@endsection
@section('seo_keywords')
{{ $dataRow->seo_keyword }}
{{ $dataRow->seo_keyword }}
@endsection
@section('seo_description')
{{ $dataRow->seo_description }}
{{ $dataRow->seo_description }}
@endsection
@section('css')
@ -38,9 +38,13 @@
<div class="row justify-content-center">
<div class="col-bg-8 col-xl-7 col-lg-12 order-xl-2">
<div class="products-detail-info">
<h2>{{ $dataRow->title }}<span>{{ trans('backend.product.tip_options.' . $dataRow->tip) }}</span></h2>
<h2>{{ $dataRow->title }}
@if (!!$dataRow->tip && $dataRow->tip != 'none')
<span>{{ trans('backend.product.tip_options.' . $dataRow->tip) }}</span>
@endif
</h2>
<div class="Txt">
{{ $dataRow->description }}
{!! $dataRow->body !!}
</div>
<div class="my-4">
<h5>Applications:</h5>
@ -60,7 +64,7 @@
<div class="slider slider-for">
@php
$img_memo = '';
$img_src = '//assets/img/products-item-a01.jpg';
$img_src = '/assets/img/products-item-a01.jpg';
$imgs = $dataRow->photos;
//$imgs = array_filter($dataRow->photos, function($v) {
// return $v['is_selected'] == true;
@ -84,9 +88,9 @@
</div>
<div class="slider slider-nav">
@php
@php
$img_memo = '';
$img_src = '//assets/img/products-item-a01.jpg';
$img_src = '/assets/img/products-item-a01.jpg';
$imgs = $dataRow->photos;
//$imgs = array_filter($dataRow->photos, function($v) {
// return $v['is_selected'] == true;
@ -134,13 +138,13 @@
<div id="tab13" class="tab-pane">
<!-- Resources 資料 -->
<div class="products-tabs-content">
{!! $dataRow->feature_resource !!}
</div>
</div>
<div id="tab14" class="tab-pane">
<!-- Related Parts 資料 -->
<div class="products-tabs-content">
{!! $dataRow->feature_related_part !!}
</div>
</div>
</div>
@ -152,78 +156,40 @@
<div class="related-products">
<h3>Related Products</h3>
<div class="slider responsive-related">
@php
foreach ($productRelateds as $row)
{
$img_memo = '';
$img_src = '/assets/img/products-item-a01.jpg';
//$imgs = $row->photos;
$imgs = array_filter($row->photos, function($v) {
return $v['is_selected'] == true;
});
if (count($imgs) > 0)
{
foreach($imgs as $img)
{
$img_memo = $img['comment'];
$img_src = URL::asset('/storage/'.$img['file_path']);
break;
}
}
@endphp
<div class="related-item">
<div class="products-item-img">
<a href="products-detail.php">
<img src="/assets/img/products-item-a01.jpg" alt="" width="100%" height="auto">
<a href="/products/detail/{{ $row->slug }}">
<img src="{{ $img_src }}" alt="" width="100%" height="auto">
<div class="products-item-mask"><span>Learn more</span></div>
</a>
</div>
<div class="products-item-info">
<h4><a href="products-detail.php">COREXOM R6490WGQ SOM</a></h4>
<p>Presenting the COREXOM R6490WGQ SOM powered by the Qualcomm® QCS6490 system-on-chip...</p>
</div>
</div>
<div class="related-item">
<div class="products-item-img">
<a href="products-detail.php">
<img src="/assets/img/products-item-a02.jpg" alt="" width="100%" height="auto">
<div class="products-item-mask"><span>Learn more</span></div>
</a>
</div>
<div class="products-item-info">
<h4><a href="products-detail.php">COREXOM R6490WGQ SOM</a></h4>
<p>Presenting the COREXOM R6490WGQ SOM powered by the Qualcomm® QCS6490 system-on-chip. Featuring the...</p>
</div>
</div>
<div class="related-item">
<div class="products-item-img">
<a href="products-detail.php">
<img src="/assets/img/products-item-a03.jpg" alt="" width="100%" height="auto">
<div class="products-item-mask"><span>Learn more</span></div>
</a>
</div>
<div class="products-item-info">
<h4><a href="products-detail.php">COREXOM R6490WGQ SOM</a></h4>
<p>Presenting the COREXOM R6490WGQ SOM powered by the Qualcomm® QCS6490 system-on-chip. Featuring the potent...</p>
</div>
</div>
<div class="related-item">
<div class="products-item-img">
<a href="products-detail.php">
<img src="/assets/img/products-item-a01.jpg" alt="" width="100%" height="auto">
<div class="products-item-mask"><span>Learn more</span></div>
</a>
</div>
<div class="products-item-info">
<h4><a href="products-detail.php">COREXOM R6490WGQ SOM</a></h4>
<p>Presenting the COREXOM R6490WGQ SOM powered by the Qualcomm® QCS6490 system-on-chip. Featuring the potent...</p>
</div>
</div>
<div class="related-item">
<div class="products-item-img">
<a href="products-detail.php">
<img src="/assets/img/products-item-a02.jpg" alt="" width="100%" height="auto">
<div class="products-item-mask"><span>Learn more</span></div>
</a>
</div>
<div class="products-item-info">
<h4><a href="products-detail.php">COREXOM R6490WGQ SOM</a></h4>
<p>Presenting the COREXOM R6490WGQ SOM powered by the Qualcomm® QCS6490 system-on-chip. Featuring the potent...</p>
</div>
</div>
<div class="related-item">
<div class="products-item-img">
<a href="products-detail.php">
<img src="/assets/img/products-item-a03.jpg" alt="" width="100%" height="auto">
<div class="products-item-mask"><span>Learn more</span></div>
</a>
</div>
<div class="products-item-info">
<h4><a href="products-detail.php">COREXOM R6490WGQ SOM</a></h4>
<p>Presenting the COREXOM R6490WGQ SOM powered by the Qualcomm® QCS6490 system-on-chip. Featuring the potent...</p>
<h4><a href="/products/detail/{{ $row->slug }}">{{ $row->title }}</a></h4>
<p>{{ Str::limit($row->description, 128) }}</p>
</div>
</div>
@php
}
@endphp
</div>
</div>

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
Support -
Support -
@endsection
@section('seo_keywords')
@ -11,11 +11,11 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
<a href="/support-technical">Support</a><span>/</span>Distribution Partners
<a href="/support/customer">Support</a><span>/</span>Distribution Partners
@endsection
@section('page-main')
@ -42,6 +42,7 @@
<div class="tab-content">
<div class="tab-pane in active">
<!-- Partner 資料 -->
<div class="support-post">
@php
foreach ($dataRows as $row)
{
@ -61,7 +62,7 @@
}
}
@endphp
<div class="support-post">
<div class="row align-items-center">
<div class="col-sm-3 col-12">
<div class="support-img">
@ -76,10 +77,11 @@
</div>
</div>
</div>
</div>
@php
}
@endphp
</div>
<!-- 分頁 -->
@php
if ($dataTotalCount > $dataPerPageItems)

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
Support -
Support -
@endsection
@section('seo_keywords')
@ -11,11 +11,11 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
<a href="/support-technical">Support</a><span>/</span>Ecosystem Partners
<a href="/support/customer">Support</a><span>/</span>Ecosystem Partners
@endsection
@section('page-main')
@ -41,6 +41,7 @@
<div class="tab-content">
<div class="tab-pane in active">
<!-- Partner 資料 -->
<div class="support-post">
@php
foreach ($dataRows as $row)
{
@ -60,7 +61,7 @@
}
}
@endphp
<div class="support-post">
<div class="row align-items-center">
<div class="col-sm-3 col-12">
<div class="support-img">
@ -75,10 +76,11 @@
</div>
</div>
</div>
</div>
@php
}
@endphp
</div>
<!-- 分頁 -->
@php
if ($dataTotalCount > $dataPerPageItems)

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
Support -
Support -
@endsection
@section('seo_keywords')
@ -11,11 +11,11 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
<a href="/support-technical">Support</a><span>/</span>Sales Inquiry
<a href="/support/customer">Support</a><span>/</span>Sales Inquiry
@endsection
@section('page-main')
@ -340,6 +340,12 @@
@section('script')
<script type="text/javascript">
$(document).ready(function(){
$('#country').find('option').each(function($idx, $elem){
if ($idx > 1){
$($elem).val($($elem).text());
}
});
});
</script>
@endsection

View File

@ -1,7 +1,7 @@
@extends('layouts.heading-page')
@section('title')
Support -
Support -
@endsection
@section('seo_keywords')
@ -11,11 +11,11 @@
@endsection
@section('css')
<link href="assets/css/page.css" rel="stylesheet"/>
<link href="/assets/css/page.css" rel="stylesheet"/>
@endsection
@section('breadcrumbs')
<a href="/support-technical">Support</a><span>/</span>Technical Support
<a href="/support/customer">Support</a><span>/</span>Customer Service
@endsection
@section('page-main')
@ -23,7 +23,7 @@
<div class="content-wrap support-wrap">
<div class="container">
<div class="contact-form mb-5">
<h2 class="h2-title">Technical Support</h2>
<h2 class="h2-title">Customer Service</h2>
<form class="form-horizontal" action="?" method="POST">
@csrf
@if ($errors->any())
@ -341,6 +341,12 @@
@section('script')
<script type="text/javascript">
$(document).ready(function(){
$('#country').find('option').each(function($idx, $elem){
if ($idx > 1){
$($elem).val($($elem).text());
}
});
});
</script>
@endsection

View File

@ -15,12 +15,16 @@
<x-backpack::menu-item :title="trans('backend.home_carousel.title')" icon="la la-question" :link="backpack_url('home-carousel')" />
<x-backpack::menu-dropdown :title="trans('backend.news.title')" icon="la la-question">
<!--
<x-backpack::menu-dropdown-item :title="trans('backend.news.catalog.title')" icon="la la-question" :link="backpack_url('news-catalog')" />
-->
<x-backpack::menu-dropdown-item :title="trans('backend.news.content.title')" icon="la la-question" :link="backpack_url('news')" />
</x-backpack::menu-dropdown>
<x-backpack::menu-dropdown :title="trans('backend.event.title')" icon="la la-question">
<!--
<x-backpack::menu-dropdown-item :title="trans('backend.event.catalog.title')" icon="la la-question" :link="backpack_url('event-catalog')" />
-->
<x-backpack::menu-dropdown-item :title="trans('backend.event.content.title')" icon="la la-question" :link="backpack_url('event')" />
</x-backpack::menu-dropdown>
@ -33,10 +37,13 @@
<x-backpack::menu-dropdown :title="trans('backend.support.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.support.technical.title')" icon="la la-question" :link="backpack_url('support-technical')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.sales_inquiry.title')" icon="la la-question" :link="backpack_url('support-sale')" />
<x-backpack::menu-dropdown-header :title="trans('backend.support.distribution_partner.title')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.distribution_partner.catalog.title')" icon="la la-question" :link="backpack_url('support-distribution-partner-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.distribution_partner.content.title')" icon="la la-question" :link="backpack_url('support-distribution-partner')" />
<x-backpack::menu-dropdown-header :title="trans('backend.support.ecosystem_partner.title')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.ecosystem_partner.catalog.title')" icon="la la-question" :link="backpack_url('support-ecosystem-partner-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.ecosystem_partner.content.title')" icon="la la-question" :link="backpack_url('support-ecosystem-partner')" />
<x-backpack::menu-dropdown nested="true" :title="trans('backend.support.distribution_partner.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.support.distribution_partner.catalog.title')" icon="la la-question" :link="backpack_url('support-distribution-partner-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.distribution_partner.content.title')" icon="la la-question" :link="backpack_url('support-distribution-partner')" />
</x-backpack::menu-dropdown>
<x-backpack::menu-dropdown nested="true" :title="trans('backend.support.ecosystem_partner.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.support.ecosystem_partner.catalog.title')" icon="la la-question" :link="backpack_url('support-ecosystem-partner-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.ecosystem_partner.content.title')" icon="la la-question" :link="backpack_url('support-ecosystem-partner')" />
</x-backpack::menu-dropdown>
</x-backpack::menu-dropdown>

View File

@ -15,6 +15,7 @@ use Illuminate\Support\Facades\Route;
Route::get('/', [\App\Http\Controllers\HomeController::class, 'index'])
->name('home');
Route::post('/', [\App\Http\Controllers\HomeController::class, 'indexPost']);
Route::get('/news', [\App\Http\Controllers\NewsController::class, 'index'])
->name('news');
@ -29,9 +30,9 @@ Route::get('/events/detail/{id}', [\App\Http\Controllers\EventsController::class
Route::get('/about', [\App\Http\Controllers\AboutController::class, 'index'])
->name('about');
Route::get('/support/technical', [\App\Http\Controllers\SupportTechnicalController::class, 'index'])
->name('support/technical');
Route::post('/support/technical', [\App\Http\Controllers\SupportTechnicalController::class, 'indexPost']);
Route::get('/support/customer', [\App\Http\Controllers\SupportTechnicalController::class, 'index'])
->name('support/customer');
Route::post('/support/customer', [\App\Http\Controllers\SupportTechnicalController::class, 'indexPost']);
Route::get('/support/sales-inquiry', [\App\Http\Controllers\SupportSalesInquiryController::class, 'index'])
->name('support/sales-inquiry');
@ -43,8 +44,37 @@ Route::get('/support/distribution-partners', [\App\Http\Controllers\SupportDistr
Route::get('/support/ecosystem-partners', [\App\Http\Controllers\SupportEcosystemPartnersController::class, 'index'])
->name('support/ecosystem-partners');
Route::get('/products', [\App\Http\Controllers\ProductsController::class, 'index'])
->name('products');
//Route::get('/products', [\App\Http\Controllers\ProductsController::class, 'index'])
// ->name('products');
Route::get('/products', function () {
return redirect('https://ec.coreality-inc.com');
});
Route::get('/products/detail/{product}', [\App\Http\Controllers\ProductsController::class, 'detail']);
Route::get('/products/{catalogs?}', [\App\Http\Controllers\ProductsController::class, 'catalogs'])
->where('catalogs','^[a-zA-Z0-9-_\/]+$');
Route::group(['middleware' => ['guest']], function(){
/**
* Register Routes
*/
//Route::get('/member/register', [\App\Http\Controllers\RegisterController::class, 'show'])->name('register.show');
//Route::post('/member/register', [\App\Http\Controllers\RegisterController::class, 'register'])->name('register.perform');
/**
* Login Routes
*/
//Route::get('/member/login', [\App\Http\Controllers\LoginController::class, 'show'])->name('login.show');
Route::get('/member/login', function () {
return redirect('https://ec.coreality-inc.com/my-account/');
});
//Route::post('/member/login', [\App\Http\Controllers\LoginController::class, 'login'])->name('login.perform');
});
Route::group(['middleware' => ['auth']], function() {
/**
* Logout Routes
*/
Route::get('/member/logout', [\App\Http\Controllers\LogoutController::class, 'perform'])->name('logout.perform');
});