https://github.com/exfriend/laracart
Laravel ORM samples to access Opencart tables
https://github.com/exfriend/laracart
Last synced: about 1 month ago
JSON representation
Laravel ORM samples to access Opencart tables
- Host: GitHub
- URL: https://github.com/exfriend/laracart
- Owner: exfriend
- Created: 2016-09-02T01:23:47.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-02T01:32:23.000Z (almost 9 years ago)
- Last Synced: 2025-04-07T11:11:08.291Z (2 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 17
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laracart
This package provides a set of Eloquent ORM models for OpenCart entities.
Using this package you can access your OpenCart database tables inside Laravel.## Installation
```
composer require exfriend/laracart
```Update your .env file (affects only Laracart):
```
DB_PREFIX=oc_
```## Usage
```
use \Exfriend\Laracart\Models\Manufacturer;$manufacturer = Manufacturer::create([
'name' => 'Canon',
'image' => 'catalog/demo/canon.jpg',
'sort_order' => 0
]);$manufacturer->description()->create([
'name' => 'Canon',
'description' => 'Better than Nikon.'
'language_id' => 1
]);$manufacturer->stores()->attach(0);
```
## Contributing
This package is work in progress. Please submit your pull requests with new models.