2022-04-23 16:25:16 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
use App\Http\Requests\StoreJoinedRequest;
|
|
|
|
use App\Http\Requests\UpdateJoinedRequest;
|
|
|
|
use App\Models\Category;
|
|
|
|
use App\Models\Joined;
|
|
|
|
|
|
|
|
class JoinedController extends Controller
|
|
|
|
{
|
2022-04-26 12:34:38 -07:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->authorizeResource(Joined::class, 'joined');
|
|
|
|
}
|
2022-04-23 16:25:16 -07:00
|
|
|
|
|
|
|
public function index()
|
|
|
|
{
|
2022-04-25 19:50:01 -07:00
|
|
|
return view('admin.joined.index');
|
2022-04-23 16:25:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public function create()
|
|
|
|
{
|
2022-04-26 12:34:38 -07:00
|
|
|
return view('admin.joined.create');
|
2022-04-23 16:25:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public function store(StoreJoinedRequest $request)
|
|
|
|
{
|
|
|
|
$validated = $request->safe()->only([
|
2022-04-26 12:34:38 -07:00
|
|
|
'categories',
|
|
|
|
'url',
|
|
|
|
'subject',
|
|
|
|
'image',
|
|
|
|
'approved',
|
|
|
|
]);
|
2022-04-25 19:50:01 -07:00
|
|
|
|
2022-04-26 12:34:38 -07:00
|
|
|
Joined::store($validated);
|
|
|
|
|
|
|
|
return redirect()->route('admin.joined.index')->with('success', 'Fanlisting added.');
|
2022-04-23 16:25:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public function edit(Joined $joined)
|
|
|
|
{
|
2022-04-26 12:34:38 -07:00
|
|
|
return view('admin.joined.edit')->with('joined', $joined);
|
2022-04-23 16:25:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public function update(UpdateJoinedRequest $request, Joined $joined)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function destroy(Joined $joined)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|