Answer the question
In order to leave comments, you need to log in
How to create a controller in a subfolder (Laravel)?
Hello)
I need to create a controller in the Admin folder.
And here is a command in the console php artisan make:controller Admin\AdminController creates a controller in the controllers folder called AdminAdminController.
I work for homestead. Everything works on the video. He has an open server.
Laravel version 5.2.
Answer the question
In order to leave comments, you need to log in
In routes \ web.php , for example, create a route
And Create a Controller in the App\Http\Controllers\Wiki
subfolder Put the
controller file
<?php
namespace App\Http\Controllers\Wiki;
use App\Http\Controllers\Controller;
class HomeController extends Controller
{
public function __construct()
{
}
public function index()
{
// Your Code
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question