We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 584c09f commit 47f9ce4Copy full SHA for 47f9ce4
app/Http/Controllers/UserController.php
@@ -776,17 +776,6 @@ public function themeBackground(request $request)
776
public function removeBackground()
777
{
778
779
- function findBackground($name){
780
- $directory = base_path('assets/img/background-img/');
781
- $files = scandir($directory);
782
- $pathinfo = "error.error";
783
- foreach($files as $file) {
784
- if (strpos($file, $name.'.') !== false) {
785
- $pathinfo = $name. "." . pathinfo($file, PATHINFO_EXTENSION);
786
- }}
787
- return $pathinfo;
788
- }
789
-
790
$user_id = Auth::user()->id;
791
$path = findBackground($user_id);
792
$path = base_path('assets/img/background-img/'.$path);
0 commit comments