-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
338 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#Create packages | ||
|
||
This package is inspired by the workbench package that came default in Laravel 4. | ||
It speeds up your workflow for creating packages, once you have set your config settings the only thing left | ||
is running the artisan command and start developing your package. | ||
|
||
##Installation | ||
|
||
You can install this package through composer by running the following command | ||
|
||
```php | ||
$ composer require jorenvanhocht\create-packages 1.0 | ||
``` | ||
|
||
Now add the service provider to the provider array in ```config/app.php``` | ||
|
||
```php | ||
jorenvanhocht\CreatePackages\Providers\CreatePackagesServiceProvider::class, | ||
``` | ||
|
||
##Configuration | ||
|
||
Publish the config file by running the following command from your terminal | ||
|
||
```php | ||
$ php artisan vendor:publish | ||
``` | ||
|
||
Set your base folder and your vendor name, and you are good to go. | ||
|
||
##Usage | ||
|
||
To create a new package run | ||
|
||
```php | ||
$ php artisan make:package yourPackageName | ||
``` | ||
|
||
If want to create a package with a different vendor name then set in your config file you can add it as a parameter | ||
|
||
```php | ||
$ php artisan make:package yourPackageName YourNewVendorName | ||
``` | ||
|
||
#TODO | ||
Learn to write tests and write tests :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,10 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"require": {} | ||
"require": {}, | ||
"autoload": { | ||
"files": [ | ||
"src/Helpers.php" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
if (! function_exists('objectify') ) | ||
{ | ||
/** | ||
* Make an object of the given var | ||
* | ||
* @param $var | ||
* @return mixed | ||
*/ | ||
function objectify($var) | ||
{ | ||
return json_decode(json_encode($var)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace {{vendorname}}\{{packageName}}\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class {{packageName}} extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return '{{vendorname}}.{{packageName2}}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace {{vendorname}}\{{packageName}}\Facades; | ||
|
||
class {{packageName}} | ||
{ | ||
|
||
} |
Oops, something went wrong.