First let's create a new folder in our root directory, the folder name is "package" as shown below :
Next, let's create another folder inside of package. This folder will gonna be our name or vendor name then our package name [vendor or creator]/ [package name]Next... let's add another folder called "src" :
Next,, open command prompt in windows, then go to that src folder, then type "composer init". Just follow the instruction :
Here is the result :
{my mistake, this composer.json should be outside of src folder >,<... So just move it outside like this :}
In order to make our package visible to laravel, we need to add some new config in laravel composer.json like this :
Execute "composer dump-autoload" to clear composer cache
Next is creating service-provider for our package,
Next,,, let's add HyosokaServiceProvider to laravel config provider :
Go to part II
No comments:
Post a Comment