Skip to content

Commit 98071b6

Browse files
Added installation page
1 parent af45b8e commit 98071b6

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Installation
2+
3+
To get the latest version of Laravel Actions, simply require the project using [Composer](https://getcomposer.org):
4+
5+
```bash
6+
composer require dragon-code/laravel-migration-actions
7+
```
8+
9+
Or manually update `require` block of `composer.json` and run `composer update` console command.
10+
11+
```json
12+
{
13+
"require": {
14+
"dragon-code/laravel-migration-actions": "^3.0"
15+
}
16+
}
17+
```
18+
19+
## Laravel Framework
20+
21+
Run the `php artisan vendor:publish --provider="DragonCode\LaravelActions\ServiceProvider"` console command for the config file publishing.
22+
23+
## Lumen Framework
24+
25+
This package is focused on Laravel development, but it can also be used in Lumen with some workarounds. Because Lumen works a little different, as it is like a barebone version of
26+
Laravel and the main configuration parameters are instead located in `bootstrap/app.php`, some alterations must be made.
27+
28+
You can install `Laravel Actions` in `app/Providers/AppServiceProvider.php`, and uncommenting this line that registers the App Service Providers so it can properly load.
29+
30+
```php
31+
// $app->register(App\Providers\AppServiceProvider::class);
32+
```
33+
34+
If you are not using that line, that is usually handy to manage gracefully multiple Lumen installations, you will have to add this line of code under
35+
the `Register Service Providers` section of your `bootstrap/app.php`.
36+
37+
```php
38+
$app->register(\DragonCode\LaravelActions\ServiceProvider::class);
39+
```
40+
41+
Next, you can copy the config file:
42+
43+
```bash
44+
cp vendor/dragon-code/laravel-migration-actions/config/actions.php config/actions.php
45+
```

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function publishConfig(): void
6767
{
6868
$this->publishes([
6969
__DIR__ . '/../config/actions.php' => $this->app->configPath('actions.php'),
70-
]);
70+
], 'config');
7171
}
7272

7373
protected function registerConfig(): void

0 commit comments

Comments
 (0)