Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 124457a

Browse files
committed
give namespace to routes
Avoiding conflict with Laravel’s Controller
1 parent 03e52a8 commit 124457a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/Http/routes.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
namespace Lucid\Console;
4+
35
Route::group(['prefix' => 'lucid'], function () {
46

57
// UI Navigation Routes
@@ -39,7 +41,7 @@
3941
});
4042

4143
Route::post('/services', function () {
42-
return app(Lucid\Console\Generators\ServiceGenerator::class)->generate(request()->input('name'))->toArray();
44+
return app(\Lucid\Console\Generators\ServiceGenerator::class)->generate(request()->input('name'))->toArray();
4345
});
4446

4547
Route::get('/features/{name}', function ($name) {
@@ -67,7 +69,7 @@
6769
$title = request()->input('title');
6870
$domain = request()->input('domain');
6971

70-
return app(Lucid\Console\Generators\JobGenerator::class)->generate($title, $domain)->toArray();
72+
return app(\Lucid\Console\Generators\JobGenerator::class)->generate($title, $domain)->toArray();
7173
});
7274

7375
Route::post('/features', function () {
@@ -76,11 +78,11 @@
7678
$service = request()->input('service');
7779
$jobs = request()->input('jobs');
7880

79-
return app(Lucid\Console\Generators\FeatureGenerator::class)->generate($title, $service, $jobs)->toArray();
81+
return app(\Lucid\Console\Generators\FeatureGenerator::class)->generate($title, $service, $jobs)->toArray();
8082
});
8183

8284
Route::get('/logs', function () {
83-
$reader = app(Stevebauman\LogReader\LogReader::class);
85+
$reader = app(\Stevebauman\LogReader\LogReader::class);
8486

8587
if (request()->has('level')) {
8688
$reader->level(request()->input('level'));
@@ -91,16 +93,16 @@
9193
});
9294

9395
Route::put('/logs/{id}/read', function ($id) {
94-
app(Stevebauman\LogReader\LogReader::class)->find($id)->markRead();
96+
app(\Stevebauman\LogReader\LogReader::class)->find($id)->markRead();
9597
});
9698

9799
Route::get('/analysis', function () {
98-
return (new Lucid\Console\Analyser())->analyse();
100+
return (new \Lucid\Console\Analyser())->analyse();
99101
});
100102

101103
});
102104

103105
class Controller
104106
{
105-
use Lucid\Console\Finder;
107+
use Finder;
106108
}

0 commit comments

Comments
 (0)