You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 27, 2023. It is now read-only.
[](https://packagist.org/packages/craftlogan/laravel-overflow)
The Laravel Overflow package will allow to easily add an overflow column to a form request. Use this package to make it easy to store overflow request values in a json column on database table:)
10
+
# Laravel Overflow
11
+
12
+
The Laravel Overflow package will allow adding an overflow column to a form request easily. Use this package to make it easy to store overflow request values in a JSON or Text column on a database table:)
11
13
## Installation
12
14
13
15
You can install the package via composer:
@@ -23,17 +25,18 @@ Defining the overflow column and table using a custom form request:
23
25
```php
24
26
<?php
25
27
26
-
namespace App\Http\Requests;
28
+
namespace CraftLogan\LaravelOverflow\Requests;
27
29
28
30
use Illuminate\Foundation\Http\FormRequest;
29
31
use CraftLogan\LaravelOverflow\Overflowable;
30
32
31
-
class CustomFormRequest extends FormRequest
33
+
class OverflowFormRequest extends FormRequest
32
34
{
33
35
use Overflowable;
34
-
public $table = 'programs';
36
+
public $table = 'test_models';
35
37
public $overflow_column = 'properties';
36
38
39
+
37
40
/**
38
41
* Determine if the user is authorized to make this request.
When setting up a migration you can use a json column or a text column:
82
+
83
+
```php
84
+
public function up()
85
+
{
86
+
Schema::create('test_models', function (Blueprint $table){
87
+
$table->increments('id');
88
+
//$table->text('properties'); // Use this column type if you are using sqlite or a mysql version less than 5.7
89
+
//$table->json('properties'); // If your database supports json then I would recommend using the json column
90
+
$table->timestamps();
91
+
});
92
+
}
93
+
94
+
```
95
+
96
+
74
97
### Testing
75
98
76
99
```bash
@@ -85,9 +108,6 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
85
108
86
109
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
87
110
88
-
### Security
89
-
90
-
If you discover any security related issues, please email craftlogan@gmail.com instead of using the issue tracker.
91
111
92
112
## Credits
93
113
@@ -98,6 +118,5 @@ If you discover any security related issues, please email craftlogan@gmail.com i
98
118
99
119
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
100
120
101
-
## Laravel Package Boilerplate
102
121
103
-
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).
122
+
This package used scafolding from the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com) built by [Marcel Pociot](https://twitter.com/marcelpociot)
0 commit comments