develop
Last change
on this file since b9c4a92 was d795fa6, checked in by Berat Kjufliju <kufliju@…>, 3 years ago |
added validation to blades
|
-
Property mode
set to
100644
|
File size:
512 bytes
|
Rev | Line | |
---|
[d795fa6] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace App\Models;
|
---|
| 4 |
|
---|
| 5 | use App\Rules\ValidationRuleSyntaxChecker;
|
---|
| 6 | use Illuminate\Database\Eloquent\Factories\HasFactory;
|
---|
| 7 | use Illuminate\Database\Eloquent\Model;
|
---|
| 8 |
|
---|
| 9 | class FileType extends Model
|
---|
| 10 | {
|
---|
| 11 | use HasFactory;
|
---|
| 12 |
|
---|
| 13 | protected $table = "file_types";
|
---|
| 14 |
|
---|
| 15 | protected $fillable = [
|
---|
| 16 | 'name',
|
---|
| 17 | 'file_validations',
|
---|
| 18 | 'file_maxsize',
|
---|
| 19 | "user_id"
|
---|
| 20 | ];
|
---|
| 21 |
|
---|
| 22 | public function getCreatedByName()
|
---|
| 23 | {
|
---|
| 24 | return User::where('id', $this->user_id)->pluck('username')->first();
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.