first commit

This commit is contained in:
f4ilji
2024-09-19 16:06:49 +05:00
commit b686638a39
1664 changed files with 428174 additions and 0 deletions
@@ -0,0 +1,26 @@
<?php
namespace App\Http\Controllers;
use App\Http\Resources\ClientLibraryPostListResource;
use App\Models\LibraryNews;
use Illuminate\Http\Request;
use Inertia\Inertia;
class ClientLibraryNewsController extends Controller
{
public function index()
{
$posts = ClientLibraryPostListResource::collection(LibraryNews::query()
->where('is_active', true)
->orderBy('id', 'desc')
->paginate(6));
return Inertia::render('Client/Library-news/Index', compact('posts'));
}
public function show(string $id)
{
$post = new ClientLibraryPostListResource(LibraryNews::query()->find($id));
return Inertia::render('Client/Library-news/Show', compact('post'));
}
}