Skip to content

Commit

Permalink
Merge pull request #41 from plank/settings-endpoint
Browse files Browse the repository at this point in the history
Add Basic endpoint for settings
  • Loading branch information
m-triassi committed Aug 3, 2021
2 parents ec399ca + 7bf656f commit 93e5838
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@
Route::get('/search', 'MediaSearchController@index')->name('search.index');
Route::get('index/{path?}', 'MediaController@index')->name('index')
->where(['path' => '.*']);

Route::get('settings', 'MediaController@index')->name('settings.index');
});
25 changes: 25 additions & 0 deletions src/Http/Controllers/MediaSettingController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
namespace Plank\MediaManager\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Storage;
use Plank\MediaManager\Models\Media;
use Plank\MediaManager\Exceptions\MediaManagerException;
use Plank\MediaManager\MediaManager;

class MediaSearchController extends BaseController
{
protected $manager;

public function __construct(MediaManager $manager)
{
$this->manager = $manager;
}

public function index(Request $request)
{
// TODO: filter sensitive items from array
return array_merge(config('mediable'), config('media-manager'));
}
}

0 comments on commit 93e5838

Please sign in to comment.