Skip to content

Commit

Permalink
Merge pull request #11 from lukasleitsch/fix/controller-not-found
Browse files Browse the repository at this point in the history
fix controller not found error
  • Loading branch information
jonassiewertsen authored May 31, 2023
2 parents 9337f33 + 65f797a commit 2aea6f6
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 2aea6f6

Please sign in to comment.