Adding new table

Closed
Vanguard - Advanced PHP Login and User Management Vanguard - Advanced PHP Login and User Management June 29, 2018
Login to reply
Milos Stojanovic Support Agent
3 years ago

Hey Joshua,

Make sure that you follow the Laravel documentation for the latest available Laravel version (5.6) since "app/http/routes.php" is moved to "routes/" folder and split into two different files (web.php and api.php).

And yes, routes/web.php is the file where you should add your new routes.

- Milos

Joshua Blevins
3 years ago

I am adding a new table and have created the migration and migrated.

I am following the laravel documentation to complete this.

I went looking for file app/http/routes.php (unable to locate).

So I went to routes/web.php

is this where I would put

<?php
use App\Companies;
use Illuminate\Http\Request;
/**
 * Show Companies Dashboard
 */
Route::get('/', function () {
    //
});
/**
 * Add New Task
 */
Route::post('/companies', function (Request $request) {
    //
});
/**
 * Delete Task
 */
Route::delete('/companies/{companies}', function (Companies $companies) {
    //
});