INit
This commit is contained in:
15
app/Http/Controllers/Client/AboutController.php
Normal file
15
app/Http/Controllers/Client/AboutController.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Client;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Inertia;
|
||||
|
||||
class AboutController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return Inertia::render('about');
|
||||
}
|
||||
}
|
||||
18
app/Http/Controllers/Client/CarouselController.php
Normal file
18
app/Http/Controllers/Client/CarouselController.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Client;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CarouselController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
public function store()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
47
app/Http/Controllers/Client/HomeController.php
Normal file
47
app/Http/Controllers/Client/HomeController.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Client;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Carousel;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Inertia;
|
||||
use Storage;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function home()
|
||||
{
|
||||
$carousel = Carousel::all();
|
||||
|
||||
|
||||
$response = [
|
||||
"carousel" => $carousel->map(function ($item) {
|
||||
return [
|
||||
"alt" => $item->alt,
|
||||
"image_url" => $item->image_url ? asset(Storage::url($item->image_url)) : null,
|
||||
];
|
||||
})
|
||||
];
|
||||
return Inertia::render('welcome', ['data' => $response]);
|
||||
|
||||
}
|
||||
public function product()
|
||||
{
|
||||
return Inertia::render('product');
|
||||
}
|
||||
public function art()
|
||||
{
|
||||
return Inertia::render('art');
|
||||
}
|
||||
public function contact()
|
||||
{
|
||||
return Inertia::render('contact');
|
||||
}
|
||||
|
||||
public function faq()
|
||||
{
|
||||
return Inertia::render('faq');
|
||||
}
|
||||
|
||||
}
|
||||
23
app/Http/Controllers/Client/TestimonialController.php
Normal file
23
app/Http/Controllers/Client/TestimonialController.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Client;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\testimonialRequest;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Inertia;
|
||||
|
||||
class TestimonialController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return Inertia::render('dashboard/testimonial');
|
||||
}
|
||||
|
||||
public function store(testimonialRequest $request)
|
||||
{
|
||||
$request->validated();
|
||||
|
||||
dd($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user