Arjun
Arjun

Reputation: 808

how to create modules in laravel 5 or hmvc in laravel 5

I am developing hmvc in laravel 5.But didnt find usefully step and code ,there will be short description each internet solution ,but i am beginner in laravel 5

I am using below library by following this link: https://github.com/teepluss/laravel-hmvc

I am writing this code in route :

hmvc::get('/', function () {
    return view('welcome');
});

but getting error:

HmvcNotFoundHttpException in Hmvc.php line 133: Request Not Found.

Call to undefined method Teepluss\Hmvc\Hmvc::get().

Upvotes: 4

Views: 668

Answers (1)

ssuhat
ssuhat

Reputation: 7656

Check your provider and aliases.

'providers' => array(

'Teepluss\Hmvc\HmvcServiceProvider'

)



'aliases' => [

'HMVC' => 'Teepluss\Hmvc\Facades\HMVC',

]

and run

php artisan vendor:publish

at route:

HMVC::get('hello-world');

Upvotes: 1

Related Questions