-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
28 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -39,10 +39,18 @@ public function settings(Request $request){ | |
} | ||
|
||
public function backups(){ | ||
$getBackups = File::allFiles(storage_path('app/Laravel')); | ||
$exists = File::exists(storage_path('app/Laravel')); | ||
if($exists){ | ||
$getBackups = File::allFiles(storage_path('app/Laravel')); | ||
} | ||
else { | ||
$getBackups = []; | ||
} | ||
|
||
return view('admin.setting.backups', [ | ||
'backups' => $getBackups | ||
]); | ||
|
||
} | ||
|
||
public function saveBackups(Request $request){ | ||
|
@@ -51,34 +59,18 @@ public function saveBackups(Request $request){ | |
if($getFile){ | ||
return response()->file($request->get('path')); | ||
} | ||
|
||
} | ||
else { | ||
exec('cd ' . base_path() . ' && /opt/homebrew/Cellar/[email protected]/7.4.15/bin/php artisan backup:run', $output, $code); | ||
Artisan::call('backup:run'); | ||
toast(__('Backup Run!'),'success'); | ||
return back(); | ||
} | ||
} | ||
|
||
public function sitemap(){ | ||
return view('admin.setting.sitemap'); | ||
} | ||
|
||
public function saveSitemap(Request $request){ | ||
|
||
setting_update('site.name', $request->get('site_name')); | ||
setting_update('site.description', $request->get('site_description')); | ||
setting_update('site.keywords', $request->get('site_keywords')); | ||
setting_update('site.author', $request->get('site_author')); | ||
$file = $request->file('site_logo'); | ||
if($file){ | ||
$imageName = time().'.'.$request->site_logo->extension(); | ||
$request->site_logo->move(public_path('images/settings'), $imageName); | ||
setting_update('site.logo', '/images/settings/'. $imageName); | ||
} | ||
|
||
toast(__('SEO Updates!'),'success'); | ||
return back(); | ||
Artisan::call('sitemap:generate'); | ||
toast(__('Sitemap Has Been Generated!'),'success'); | ||
return redirect()->to('admin/settings'); | ||
} | ||
|
||
public function modules(){ | ||
|
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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> | ||
<url> | ||
<loc>http://lamba.test/</loc> | ||
<lastmod>2021-03-13T11:45:25+00:00</lastmod> | ||
<changefreq>daily</changefreq> | ||
<priority>0.8</priority> | ||
</url> | ||
</urlset> |
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
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