mirror of https://github.com/4xmen/xshop.git
parent
527cf862a9
commit
468d9f60aa
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Post;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ClientController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
public function welcome(){
|
||||||
|
$area = 'index';
|
||||||
|
$title = config('app.name');
|
||||||
|
$subtitle = getSetting('subtitle');
|
||||||
|
return view('client.welcome',compact('area','title','subtitle'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function post(Post $post){
|
||||||
|
$area = 'post';
|
||||||
|
$title = $post->title;
|
||||||
|
$subtitle = $post->subtitle;
|
||||||
|
return view('client.post',compact('area','post','title','subtitle'));
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 474 KiB |
@ -0,0 +1,13 @@
|
|||||||
|
@extends('website.inc.website-layout')
|
||||||
|
|
||||||
|
@section('title')
|
||||||
|
{{$post->title}} - {{config('app.name')}}
|
||||||
|
@endsection
|
||||||
|
@section('content')
|
||||||
|
<main>
|
||||||
|
@foreach(getParts($area) as $part)
|
||||||
|
@php($p = $part->getBladeWithData())
|
||||||
|
@include($p['blade'],['data' => $p['data']])
|
||||||
|
@endforeach
|
||||||
|
</main>
|
||||||
|
@endsection
|
Loading…
Reference in New Issue