You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/app/Http/Controllers/ClientController.php

32 lines
738 B
PHTML

<?php
namespace App\Http\Controllers;
use App\Models\Post;
use Illuminate\Http\Request;
5 months ago
use Spatie\Tags\Tag;
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'));
}
5 months ago
public function tag($slug){
$tag = Tag::where('slug->'.config('app.locale'),'like',$slug)->first();
return $tag;
}
}