-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from DSE-Western-Thessaloniki:parapente/issue94
Προσθήκη επιλογής για έλεγχο των τιμών που θα μπορεί να εισάγει ο χρήστης και δυνατότητας προσθήκης αρχείων. Σελιδοποίηση στα αποτελέσματα
- Loading branch information
Showing
88 changed files
with
9,350 additions
and
3,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"recommendations": [ | ||
"mikestead.dotenv", | ||
"amiralizadeh9480.laravel-extra-intellisense", | ||
"ryannaddy.laravel-artisan", | ||
"onecentlin.laravel-extension-pack", | ||
"formulahendry.auto-close-tag", | ||
"ibm.output-colorizer", | ||
"alefragnani.bookmarks", | ||
"stkb.rewrap", | ||
"hollowtree.vue-snippets", | ||
"formulahendry.code-runner", | ||
"streetsidesoftware.code-spell-checker", | ||
"streetsidesoftware.code-spell-checker-greek", | ||
"codestream.codestream", | ||
"ikappas.composer", | ||
"pranaygp.vscode-css-peek", | ||
"dbaeumer.vscode-eslint", | ||
"mhutchie.git-graph", | ||
"eamodio.gitlens", | ||
"nhoizey.gremlins", | ||
"ecmel.vscode-html-css", | ||
"brunnerh.insert-unicode", | ||
"zignd.html-css-class-completion", | ||
"codingyu.laravel-goto-view", | ||
"stef-k.laravel-goto-controller", | ||
"ms-vsliveshare.vsliveshare", | ||
"lostintangent.vsls-whiteboard", | ||
"tyriar.lorem-ipsum", | ||
"christian-kohler.path-intellisense", | ||
"mehedidracula.php-namespace-resolver", | ||
"wongjn.php-sniffer", | ||
"sainoba.px-to-rem", | ||
"humao.rest-client", | ||
"syler.sass-indented", | ||
"mtxr.sqltools", | ||
"mtxr.sqltools-driver-mysql", | ||
"tabnine.tabnine-vscode", | ||
"visualstudioexptteam.vscodeintellicode", | ||
"redhat.vscode-yaml", | ||
"m1guelpf.better-pest", | ||
"bmewburn.vscode-intelephense-client", | ||
"RobertOstermann.inline-parameters-extended", | ||
"esbenp.prettier-vscode", | ||
"GitHub.vscode-pull-request-github", | ||
"onecentlin.laravel-blade", | ||
"Cardinal90.multi-cursor-case-preserve", | ||
"georgykurian.laravel-ide-helper", | ||
"open-southeners.laravel-pint", | ||
"xdebug.php-debug", | ||
"vue.volar" | ||
] | ||
} |
112 changes: 112 additions & 0 deletions
112
app/Http/Controllers/Admin/AcceptedFiletypeController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Admin; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Http\Requests\StoreAcceptedFiletypeRequest; | ||
use App\Http\Requests\UpdateAcceptedFiletypeRequest; | ||
use App\Models\AcceptedFiletype; | ||
|
||
class AcceptedFiletypeController extends Controller | ||
{ | ||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->authorizeResource(AcceptedFiletype::class, 'accepted_filetype'); | ||
} | ||
|
||
/** | ||
* Display a listing of the resource. | ||
*/ | ||
public function index() | ||
{ | ||
$accepted_filetypes = AcceptedFiletype::all(); | ||
|
||
return view('admin.accepted_filetype.index') | ||
->with('accepted_filetypes', $accepted_filetypes); | ||
} | ||
|
||
/** | ||
* Show the form for creating a new resource. | ||
*/ | ||
public function create() | ||
{ | ||
return view('admin.accepted_filetype.create'); | ||
} | ||
|
||
/** | ||
* Store a newly created resource in storage. | ||
*/ | ||
public function store(StoreAcceptedFiletypeRequest $request) | ||
{ | ||
// Αφαίρεσε το * από την επέκταση αν έχει κατά λάθος δοθεί | ||
$extension = $request->validated('extension'); | ||
$extension = str_replace('*.', '.', $extension); | ||
|
||
AcceptedFiletype::create( | ||
array_merge( | ||
$request->validated(), | ||
[ | ||
'extension' => $extension, | ||
] | ||
) | ||
); | ||
|
||
return redirect(route('admin.accepted_filetype.index')) | ||
->with('success', 'Ο τύπος αρχείων δημιουργήθηκε επιτυχώς'); | ||
} | ||
|
||
/** | ||
* Display the specified resource. | ||
*/ | ||
public function show(AcceptedFiletype $acceptedFiletype) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
*/ | ||
public function edit(AcceptedFiletype $acceptedFiletype) | ||
{ | ||
return view('admin.accepted_filetype.edit') | ||
->with('accepted_filetype', $acceptedFiletype); | ||
} | ||
|
||
/** | ||
* Update the specified resource in storage. | ||
*/ | ||
public function update(UpdateAcceptedFiletypeRequest $request, AcceptedFiletype $acceptedFiletype) | ||
{ | ||
// Αφαίρεσε το * από την επέκταση αν έχει κατά λάθος δοθεί | ||
$extension = $request->validated('extension'); | ||
$extension = str_replace('*.', '.', $extension); | ||
|
||
$acceptedFiletype->update( | ||
array_merge( | ||
$request->validated(), | ||
[ | ||
'extension' => $extension, | ||
] | ||
) | ||
); | ||
|
||
return redirect(route('admin.accepted_filetype.index')) | ||
->with('success', 'Ο τύπος αρχείων ενημερώθηκε επιτυχώς'); | ||
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
*/ | ||
public function destroy(AcceptedFiletype $acceptedFiletype) | ||
{ | ||
$acceptedFiletype->delete(); | ||
|
||
return redirect(route('admin.accepted_filetype.index')) | ||
->with('success', 'Επιτυχής διαγραφή τύπου αρχείων'); | ||
} | ||
} |
Oops, something went wrong.