Skip to content

Commit

Permalink
use class reference to fix controller not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasleitsch committed May 31, 2023
1 parent 9337f33 commit 65f797a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
18 changes: 12 additions & 6 deletions routes/cp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
|--------------------------------------------------------------------------
*/

use Jonassiewertsen\OhDear\Http\Controllers\BrokenLinksController;
use Jonassiewertsen\OhDear\Http\Controllers\CertificateHealthController;
use Jonassiewertsen\OhDear\Http\Controllers\MixedContentController;
use Jonassiewertsen\OhDear\Http\Controllers\OverviewController;
use Jonassiewertsen\OhDear\Http\Controllers\UptimeController;

Route::prefix('oh-dear/')->name('oh-dear.')->group(function() {
Route::get('/', 'OverviewController@index')->name('index');
Route::get('/uptime', 'UptimeController@index')->name('uptime');
Route::get('/broken-links', 'BrokenLinksController@index')->name('broken-links');
Route::get('/mixed-content', 'MixedContentController@index')->name('mixed-content');
Route::get('/certificate-health', 'CertificateHealthController@index')->name('certificate-health');
});
Route::get('/', OverviewController::class)->name('index');
Route::get('/uptime', UptimeController::class)->name('uptime');
Route::get('/broken-links', BrokenLinksController::class)->name('broken-links');
Route::get('/mixed-content', MixedContentController::class)->name('mixed-content');
Route::get('/certificate-health', CertificateHealthController::class)->name('certificate-health');
});
2 changes: 1 addition & 1 deletion src/Http/Controllers/BrokenLinksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class BrokenLinksController extends Controller
{
public function index()
public function __invoke()
{
$this->authorize('show ohdear');

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/CertificateHealthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class CertificateHealthController extends Controller
{
public function index()
public function __invoke()
{
$this->authorize('show ohdear');

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/MixedContentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class MixedContentController extends Controller
{
public function index()
public function __invoke()
{
$this->authorize('show ohdear');

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/OverviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class OverviewController extends Controller
{
public function index()
public function __invoke()
{
$this->authorize('show ohdear');

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/UptimeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class UptimeController extends Controller
{
public function index()
public function __invoke()
{
$this->authorize('show ohdear');

Expand Down

0 comments on commit 65f797a

Please sign in to comment.