Skip to content

Commit f2549de

Browse files
committed
first commit
0 parents  commit f2549de

File tree

7 files changed

+171
-0
lines changed

7 files changed

+171
-0
lines changed

.styleci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
preset: laravel
2+
3+
enabled:
4+
- strict
5+
- unalign_double_arrow
6+
- phpdoc_order
7+
- phpdoc_separation
8+
9+
disabled:
10+
- short_array_syntax
11+
- not_operator_with_successor_space
12+
13+
finder:
14+
exclude:
15+
- "public"
16+
- "resources"
17+
- "tests"
18+
name:
19+
- "*.php"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 laravel-enso
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Laravel Enso DataExport
2+
3+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4c084aada0bf4f70bf397338300bfc5d)](https://www.codacy.com/app/laravel-enso/Helpers?utm_source=github.com&utm_medium=referral&utm_content=laravel-enso/Helpers&utm_campaign=badger)
4+
[![StyleCI](https://styleci.io/repos/85466970/shield?branch=master)](https://styleci.io/repos/85466970)
5+
[![License](https://poser.pugx.org/laravel-enso/dataexport/license)](https://packagist.org/packages/laravel-enso/dataexport)
6+
[![Total Downloads](https://poser.pugx.org/laravel-enso/dataexport/downloads)](https://packagist.org/packages/laravel-enso/dataexport)
7+
[![Latest Stable Version](https://poser.pugx.org/laravel-enso/dataexport/version)](https://packagist.org/packages/laravel-enso/dataexport)
8+
9+
Data Export structure dependency for [Laravel Enso](https://github.com/laravel-enso/Enso).
10+
11+
### SOON...
12+
13+
### Contributions
14+
15+
are welcome. Pull requests are great, but issues are good too.
16+
17+
### License
18+
19+
This package is released under the MIT license.
20+
<!--/h-->

composer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "laravel-enso/dataexport",
3+
"description": "Structure for holding Laravel-Enso exports",
4+
"keywords": [
5+
"data-export",
6+
"laravel-enso",
7+
"enso-exports"
8+
],
9+
"homepage": "https://github.com/laravel-enso/DataExport",
10+
"type": "library",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Adrian Ocneanu",
15+
"email": "aocneanu@gmail.com",
16+
"homepage": "https://laravel-enso.com",
17+
"role": "Developer"
18+
},
19+
],
20+
"require": {
21+
"php": ">=7.1.0",
22+
"laravel/framework": "5.7.*",
23+
"laravel-enso/filemanager": "2.5.*",
24+
"laravel-enso/helpers": "1.8.*"
25+
},
26+
"require-dev": {
27+
"laravel-enso/testhelper": "1.4.*"
28+
},
29+
"autoload": {
30+
"psr-4": {
31+
"LaravelEnso\\DataExport\\": "src/"
32+
}
33+
},
34+
"extra": {
35+
"laravel": {
36+
"providers": [
37+
"LaravelEnso\\DataExport\\AppServiceProvider"
38+
]
39+
}
40+
}
41+
}

src/AppServiceProvider.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace LaravelEnso\DataExport;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class AppServiceProvider extends ServiceProvider
8+
{
9+
public function boot()
10+
{
11+
$this->loadMigrationsFrom(__DIR__.'/database/migrations');
12+
}
13+
14+
public function register()
15+
{
16+
//
17+
}
18+
}

src/app/Models/DataExport.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace LaravelEnso\DataExport\app\Models;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
use LaravelEnso\TrackWho\app\Traits\CreatedBy;
7+
use LaravelEnso\FileManager\app\Traits\HasFile;
8+
use LaravelEnso\FileManager\app\Contracts\Attachable;
9+
use LaravelEnso\FileManager\app\Contracts\VisibleFile;
10+
11+
class DataExport extends Model implements Attachable, VisibleFile
12+
{
13+
use HasFile, CreatedBy;
14+
15+
protected $fillable = ['type'];
16+
17+
public function folder()
18+
{
19+
return config('enso.config.paths.exports');
20+
}
21+
22+
public function isDeletable()
23+
{
24+
return true;
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateDataExportsTable extends Migration
8+
{
9+
public function up()
10+
{
11+
Schema::create('data_exports', function (Blueprint $table) {
12+
$table->increments('id');
13+
14+
$table->integer('created_by')->unsigned();
15+
$table->foreign('created_by')->references('id')
16+
->on('users');
17+
18+
$table->timestamps();
19+
});
20+
}
21+
22+
public function down()
23+
{
24+
Schema::dropIfExists('data_exports');
25+
}
26+
}

0 commit comments

Comments
 (0)