mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
Migrations, Seeders, Models, Resources for User, Client, Project, Team, Mastertask, Subtask, Timeblock, Timesheet, Attachment
This commit is contained in:
1 parent
30ae7dab84
commit
8d88c0c4e6
35 files changed
+910
-14
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Attachment>
|
||||
*/
|
||||
class AttachmentFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
$extension = fake()->fileExtension();
|
||||
|
||||
return [
|
||||
'original_name' => fake()->words(2, true) . '.' . $extension,
|
||||
'disk_name' => Str::random(15) . '.' . $extension,
|
||||
'path' => fake()->imageUrl(),
|
||||
'extension' => $extension,
|
||||
'content_type' => fake()->mimeType(),
|
||||
'file_size' => fake()->numberBetween(1323,992385),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user