1 | <?php |
||
2 | |||
3 | /** |
||
4 | * @license MIT, http://opensource.org/licenses/MIT |
||
5 | * @copyright Aimeos (aimeos.org), 2015-2023 |
||
6 | */ |
||
7 | |||
8 | |||
9 | namespace Aimeos\Shop\Controller; |
||
10 | |||
11 | use Aimeos\Shop\Facades\Shop; |
||
12 | use Illuminate\Routing\Controller; |
||
13 | use Illuminate\Support\Facades\Response; |
||
14 | |||
15 | |||
16 | /** |
||
17 | * Aimeos controller for supplier related functionality. |
||
18 | */ |
||
19 | class SupplierController extends Controller |
||
20 | { |
||
21 | /** |
||
22 | * Returns the html for the supplier detail page. |
||
23 | * |
||
24 | * @return \Illuminate\Http\Response Response object with output and headers |
||
25 | */ |
||
26 | public function detailAction() |
||
27 | { |
||
28 | try |
||
29 | { |
||
30 | $params = ['page' => 'page-supplier-detail']; |
||
31 | |||
32 | foreach( app( 'config' )->get( 'shop.page.supplier-detail' ) as $name ) |
||
33 | { |
||
34 | $params['aiheader'][$name] = Shop::get( $name )->header(); |
||
35 | $params['aibody'][$name] = Shop::get( $name )->body(); |
||
36 | } |
||
37 | |||
38 | return Response::view( Shop::template( 'supplier.detail' ), $params ) |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
39 | ->header( 'Cache-Control', 'private, max-age=10' ); |
||
40 | } |
||
41 | catch( \Exception $e ) |
||
42 | { |
||
43 | if( $e->getCode() >= 400 && $e->getCode() < 600 ) { abort( $e->getCode() ); } |
||
44 | throw $e; |
||
45 | } |
||
46 | } |
||
47 | } |