- Add RecoveryController
This commit is contained in:
parent
215ae69214
commit
dc5b7d624a
1 changed files with 27 additions and 0 deletions
27
app/Http/Controllers/RecoveryController.php
Normal file
27
app/Http/Controllers/RecoveryController.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Media;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RecoveryController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
Auth::user()->authorizeRoles(config('roles.const.ADMIN'));
|
||||
|
||||
return view('recovery.index');
|
||||
}
|
||||
|
||||
public function checkArcadiaId(Request $request)
|
||||
{
|
||||
$response = false;
|
||||
$arcadia_id = $request->id;
|
||||
$media = Media::onlyTrashed()->where('arcadia_id', '=', $arcadia_id)->first();
|
||||
if ($media)
|
||||
$response = true;
|
||||
return json_encode($response);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue