Add (post manage)
Add (post country viewing)
This commit is contained in:
27
app/Http/Controllers/Admin/PostController.php
Normal file
27
app/Http/Controllers/Admin/PostController.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Post;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PostController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$posts = Post::with('post_categories.category.country_locale')->orderBy('created_at', 'desc')->paginate();
|
||||
|
||||
return view('admin.posts.manage', compact('posts'));
|
||||
}
|
||||
|
||||
public function new(Request $request)
|
||||
{
|
||||
return 'PostController@new';
|
||||
}
|
||||
|
||||
public function edit(Request $request, $post_id)
|
||||
{
|
||||
return 'PostController@edit : '.$post_id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user