Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
3ac9841d
Commit
3ac9841d
authored
Sep 02, 2016
by
Pralhad Shrestha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the routes as of Laravel 5.3
parent
b9aca03c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
1 deletion
+48
-1
RouteServiceProvider.php
app/Providers/RouteServiceProvider.php
+3
-1
api.php
routes/api.php
+15
-0
console.php
routes/console.php
+15
-0
web.php
routes/web.php
+15
-0
No files found.
app/Providers/RouteServiceProvider.php
View file @
3ac9841d
...
...
@@ -2,7 +2,7 @@
namespace
App\Providers
;
use
Illuminate\
Routing\Router
;
use
Illuminate\
Support\Facades\Route
;
use
Illuminate\Foundation\Support\Providers\RouteServiceProvider
as
ServiceProvider
;
class
RouteServiceProvider
extends
ServiceProvider
...
...
@@ -31,6 +31,8 @@ class RouteServiceProvider extends ServiceProvider
*/
public
function
map
()
{
$this
->
mapWebRoutes
();
$this
->
mapApiRoutes
();
}
/**
* Define the "web" routes for the application.
...
...
routes/api.php
0 → 100644
View file @
3ac9841d
<?php
use
Illuminate\Http\Request
;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route
::
get
(
'/user'
,
function
(
Request
$request
)
{
return
$request
->
user
();
})
->
middleware
(
'auth:api'
);
\ No newline at end of file
routes/console.php
0 → 100644
View file @
3ac9841d
<?php
use
Illuminate\Foundation\Inspiring
;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan
::
command
(
'inspire'
,
function
()
{
$this
->
comment
(
Inspiring
::
quote
());
})
->
describe
(
'Display an inspiring quote'
);
\ No newline at end of file
app/Http/routes
.php
→
routes/web
.php
View file @
3ac9841d
<?php
<?php
/*
|--------------------------------------------------------------------------
|
Application
Routes
|
Web
Routes
|--------------------------------------------------------------------------
|
|
Here is where you can register all of the routes for an application.
|
It's a breeze. Simply tell Laravel the URIs it should respond to
|
and give it the controller to call when that URI is requested.
|
This file is where you may define all of the routes that are handled
|
by your application. Just tell Laravel the URIs it should respond
|
to using a Closure or controller method. Build something great!
|
*/
Route
::
get
(
'/'
,
function
()
{
return
view
(
'welcome'
);
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment