Routes to home controller setup

This commit is contained in:
amazing-username
2017-05-24 13:32:05 -05:00
commit 9a289c54f5
84 changed files with 6403 additions and 0 deletions
Binary file not shown.
Executable
+18
View File
@@ -0,0 +1,18 @@
<?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::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
+16
View File
@@ -0,0 +1,16 @@
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});
+18
View File
@@ -0,0 +1,18 @@
<?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');
Executable
+37
View File
@@ -0,0 +1,37 @@
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', 'HomeController@index');
Route::get('login', 'HomeController@login');
Route::get('register', 'HomeController@register');
Route::get('laravel', function () {
return view('welcome');
});
Route::get('hotboy', function () {
return 'I\'m iced up, ugly corner where we\'re from we don\'t really like ya';
});
Route::get('stunt', function () {
/**
$user = new User;
user->firstname = "John";
user->lastname = "Doe";
user->username = "Bigboy69420";
user->password = "Swish";
user->save();
*/
return "Check the database, I think someone was created";
});
//Route::resource('user', 'UserController');
//Route::get('user/index', 'App\Http\Controllers\UserController@index');