During development, various situations may arise, including the need to build controllers into the package operation.

To create a new controller, you must run the command make:controller:

php artisan make:controller CustomOrchidController

In the app/Http/Controllers directory, a new class will be created, change it:

namespace App\Http\Controllers;

class CustomOrchidController extends Controller
     * @return \Illuminate\View\View
    public function index()
        return view('custom');

The index method returns the application template, in which we will visualize the entire package style:


@section('description', 'description')

    <div class="text-center">

    <div class="text-center mt-5 mb-5">

The created controller must be declared in the route file, for example, in routes/platform, so that common rules apply to it, such as authorization.

Route::get('custom', [\App\Http\Controllers\CustomOrchidController::class, 'index']);