7.4 support
This commit is contained in:
parent
ae5049091f
commit
3cedf3da29
7 changed files with 15 additions and 15 deletions
|
@ -14,7 +14,7 @@ class HomeController extends Controller
|
|||
}
|
||||
|
||||
/** Show the application dashboard. */
|
||||
public function index(Request $request): Renderable
|
||||
public function index(Request $request)
|
||||
{
|
||||
//set cookie as extra layer of defense against users that make multiple accounts
|
||||
setcookie('4b3403665fea6' , base64_encode(1) , time() + (20 * 365 * 24 * 60 * 60));
|
||||
|
|
|
@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
class NotificationController extends Controller
|
||||
{
|
||||
/** Display a listing of the resource. */
|
||||
public function index(): View|Factory
|
||||
public function index()
|
||||
{
|
||||
$notifications = Auth::user()->notifications()->paginate();
|
||||
|
||||
|
@ -22,7 +22,7 @@ class NotificationController extends Controller
|
|||
}
|
||||
|
||||
/** Display the specified resource. */
|
||||
public function show(string $id): View|Factory
|
||||
public function show(string $id)
|
||||
{
|
||||
$notification = Auth::user()->notifications()->findOrFail($id);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ use Illuminate\Support\Facades\Hash;
|
|||
class ProfileController extends Controller
|
||||
{
|
||||
/** Display a listing of the resource. */
|
||||
public function index(): View|Factory
|
||||
public function index()
|
||||
{
|
||||
return view('profile.index')->with([
|
||||
'user' => Auth::user(),
|
||||
|
@ -25,7 +25,7 @@ class ProfileController extends Controller
|
|||
}
|
||||
|
||||
/** Update the specified resource in storage. */
|
||||
public function update(Request $request, int $id): RedirectResponse
|
||||
public function update(Request $request, int $id)
|
||||
{
|
||||
//prevent other users from editing a user
|
||||
if ($id != Auth::user()->id) dd(401);
|
||||
|
|
|
@ -23,7 +23,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
class ServerController extends Controller
|
||||
{
|
||||
/** Display a listing of the resource. */
|
||||
public function index(): View|Factory
|
||||
public function index()
|
||||
{
|
||||
return view('servers.index')->with([
|
||||
'servers' => Auth::user()->Servers
|
||||
|
@ -31,7 +31,7 @@ class ServerController extends Controller
|
|||
}
|
||||
|
||||
/** Show the form for creating a new resource. */
|
||||
public function create(): View|Factory|RedirectResponse
|
||||
public function create()
|
||||
{
|
||||
//limit
|
||||
if (Auth::user()->Servers->count() >= Auth::user()->server_limit) {
|
||||
|
@ -54,7 +54,7 @@ class ServerController extends Controller
|
|||
}
|
||||
|
||||
/** Store a newly created resource in storage. */
|
||||
public function store(Request $request): RedirectResponse
|
||||
public function store(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
"name" => "required|max:191",
|
||||
|
@ -95,7 +95,7 @@ class ServerController extends Controller
|
|||
}
|
||||
|
||||
/** Quick Fix */
|
||||
private function serverCreationFailed(Server $server): RedirectResponse
|
||||
private function serverCreationFailed(Server $server)
|
||||
{
|
||||
$server->delete();
|
||||
|
||||
|
@ -104,7 +104,7 @@ class ServerController extends Controller
|
|||
}
|
||||
|
||||
/** Remove the specified resource from storage. */
|
||||
public function destroy(Server $server): RedirectResponse
|
||||
public function destroy(Server $server)
|
||||
{
|
||||
try {
|
||||
$server->delete();
|
||||
|
|
|
@ -12,7 +12,7 @@ use Illuminate\Http\Response;
|
|||
class StoreController extends Controller
|
||||
{
|
||||
/** Display a listing of the resource. */
|
||||
public function index(): View|Factory|Response|Application
|
||||
public function index()
|
||||
{
|
||||
$isPaypalSetup = false;
|
||||
if (env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID')) $isPaypalSetup = true;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"php": "^8.0|^7.4",
|
||||
"biscolab/laravel-recaptcha": "^5.0",
|
||||
"doctrine/dbal": "^3.1",
|
||||
"fideloper/proxy": "^4.4",
|
||||
|
|
6
composer.lock
generated
6
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "abf5188ab5883d960e77b5b0addca104",
|
||||
"content-hash": "dda32482531d11fdf6adc74fcba74715",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
@ -8568,9 +8568,9 @@
|
|||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^8.0",
|
||||
"php": "^8.0|^7.4",
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.1.0"
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue