I downloaded Composer, installed Laravel, and started my first Laravel project to begin learning Laravel using the lessons on laracast (great lessons). Lesson two covers routes. My new project does not have a routes.php file.

I deleted composer and started again. Same thing. Tried two different computers. Same thing. I was using NetBeans so I tried using PHP Storm. Same thing. I tried making my own routes.php file but it doesn't seem to work right because I know nothing about Laravel at this point. I tried creating and saving the project in htdocs, and then PHPStorm project folder, again - no routes.php file.

Composer保存在这里-C:\Users\myName\AppData\Roaming\Composer\vendor\bin.我在命令提示符中使用composer global require"laravel/installer"来安装laravel.有什么 idea 吗?

推荐答案

The lastest version of Laravel doesn't have a routes.php file.

这是"路由".在旧版本中,php的文件位于\app\Http中.

在较新版本Laravel 5.3中,我们有一个名为"routes"的文件夹,可以在其中找到以下文件:

  • 应用程序编程接口.php
  • console.php
  • 网状物php

For this new version, the routes for your controllers, you can put inside 网状物php file

请参阅此处有关路由的文档

https://laravel.com/docs/5.3/routing#basic-routing

您正在观看的视频课程可能已过时.

Laravel相关问答推荐

Livewire 基于下拉 Select 自动填充输入框

我如何通过 laravel 在高图中针对不同的时间范围进行烛台数据分组

Laravel phpunit 测试失败并出现 PDOException:SQLSTATE[HY000]:一般错误:1 接近0:语法错误

Laravel 有Many Many to Many To One Eloquent

如何使用 Laravel Passport 在 API 中正确实现 OAuth?

错误try 访问 null 类型值的数组偏移量laravel 5.8.26 Php 7.4.2

Laravel 5.4 存储:下载文件.文件不存在,但显然存在

如何在 Laravel 中显示渲染时间/页面加载时间?

链接到容器时如何使用主机网络?

Laravel Auth::attempt() 返回 false

Laravel Session 总是改变 Laravel 5.4 中的每个刷新/请求

Laravel 5.2 中的正则表达式验证

413请求实体在laravel homestead for windows中太大的nginx服务器

Laravel Nova - 重新排序左侧导航菜单项

Laravel 5:完整性约束违规:1452 无法添加或更新子行:外键约束失败

如何在 Laravel 中实现数组类型路由?

Class类 App\Http\Controllers\Auth\Request 不存在.

如何清理 Laravel Bootstrap 缓存配置文件?

Laravel 隐藏属性.例如密码 - 安全

使用 Queue::fake() 测试监听器