Laravel 5.1 应用程序和 home.blade.php 丢失

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30980906/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 11:49:23  来源:igfitidea点击:

Laravel 5.1 app and home.blade.php missing

phplaravel

提问by Myat Htut

I created a new project via composer in Laravel 5.1.
I couldn't find the app.blade.php.and home.blade.phpfile, what am I doing wrong?

我通过Laravel 5.1中的composer创建了一个新项目。
我找不到 app.blade.php.andhome.blade.php文件,我做错了什么?

回答by Ennosuke Ajibana

You didn't do anything wrong. The Auth Scaffolding was removed from Laravel 5.1. That includes the app.blade.phpand the home.blade.phpthat you mentioned.

你没有做错任何事。Auth Scaffolding 已从 Laravel 5.1 中移除。这包括你提到的app.blade.phphome.blade.php

However, you'll still be able to get it back with the Scafold Package:

但是,您仍然可以使用Scafold Package取回它:

1.Add Scafold to your composer.jsonfile in the require :section :

1.将 Scafold 添加到您的composer.json文件require :部分:

require : {
        "laravel/framework": "5.1.*",
        "bestmomo/scafold": "dev-master"
}

or type from terminal :

或从终端输入:

composer require bestmomo/scafold dev-master

2.Update composer :

2.更新作曲家:

composer update

3.Add the service provider to your config/app.php :

3.将服务提供者添加到您的 config/app.php :

Bestmomo\Scafold\ScafoldServiceProvider::class,

4.Publish the views and assets :

4.发布观点和资产:

php artisan vendor:publish

Done!

完毕!

回答by Sambhav Pandey

Run php artisan make:authand it will automatically generate layoyts\app.blade.phpand home.blade.php

运行php artisan make:auth,它会自动生成layoyts\app.blade.phphome.blade.php

回答by Micro

If you want to use laravel 5.0 you can download it from their repo here:

如果你想使用 laravel 5.0,你可以从这里的 repo 下载它:

https://github.com/laravel/laravel/tree/5.0

https://github.com/laravel/laravel/tree/5.0

And here is a video showing how to get started:

这是一个视频,展示了如何开始:

https://scotch.io/tutorials/login-with-the-built-in-laravel-5-scaffolding

https://scotch.io/tutorials/login-with-the-built-in-laravel-5-scaffolding

Basically just

基本上只是

1) run composer installto get the dependencies then

1)运行composer install以获取依赖项然后

2) run artisan key:generateto generate your random key for .envfile.

2)运行artisan key:generate以生成.env文件的随机密钥。

3) set your database info in .envfile

3)在.env文件中设置您的数据库信息

4) run artisan migrateto set up the database

4)运行artisan migrate建立数据库

and you should be set

你应该被设置