Home > Backend Development > PHP Tutorial > How to generate an empty controller in laravel 5.1?

How to generate an empty controller in laravel 5.1?

WBOY
Release: 2016-07-06 13:54:12
Original
1170 people have browsed it

php artisan make:controller Home/NameController.php

There are many methods in the controller generated by this sentence, and it is really troublesome to delete them every time!

Reply content:

php artisan make:controller Home/NameController.php

There are many methods in the controller generated by this sentence, and it is really troublesome to delete them every time!

<code>php artisan make:controller Home/NameController.php --plain</code>
Copy after login

The correct answer upstairs! 5.1 needs to add --plain, 5.2 uses the command to directly generate an empty controller.

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template