README.md 846 Bytes
Newer Older
Angel MAS committed
1
# Package products OneStartup
Angel MAS committed
2

Angel MAS committed
3
  **onestartup/product** is a module product for websites
Angel MAS committed
4 5 6 7 8 9

# Installation

- Run this in the terminal

```php
Angel MAS committed
10
composer require onestartup/product
Angel MAS committed
11 12 13 14 15
```

- after add the ServiceProvider to the providers array in config/app.php

```php
Angel MAS committed
16
Onestartup\Product\ProductServiceProvider::class,
Angel MAS committed
17 18 19 20 21 22 23 24
```

- Run migration

```php
php artisan migrate
```

Angel MAS committed
25 26 27 28 29 30 31 32 33
- add next lines to app/User.php

```php
public function products()
{
    return $this->hasMany('Onestartup\Product\Model\Product', 'user_id');
}
```

Angel MAS committed
34 35 36
- run command for publish views

```php
Angel MAS committed
37
php artisan vendor:publish --provider="Onestartup\Product\ProductServiceProvider"
Angel MAS committed
38 39 40 41 42 43 44 45 46 47 48
```

- run serv

```php
php artisan serve
```

- test in this route how admin user

```php
Angel MAS committed
49
http://localhost:8000/admin/product/product
Angel MAS committed
50 51 52 53 54
```

- test in this route 

```php
Angel MAS committed
55
http://localhost:8000/portafolio
Angel MAS committed
56
```