Upgrade to Laravel 8
This commit is contained in:
parent
1ad58f10c5
commit
57186c3e2e
27 changed files with 945 additions and 1003 deletions
39
database/seeders/ContactsTableSeeder.php
Normal file
39
database/seeders/ContactsTableSeeder.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Contact;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\FileSystem\FileSystem;
|
||||
|
||||
class ContactsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Contact::create([
|
||||
'nick' => 'tantek',
|
||||
'name' => 'Tantek Çelik',
|
||||
'homepage' => 'http://tantek.com',
|
||||
'twitter' => 't',
|
||||
]);
|
||||
Contact::create([
|
||||
'nick' => 'aaron',
|
||||
'name' => 'Aaron Parecki',
|
||||
'homepage' => 'https://aaronparecki.com',
|
||||
'facebook' => '123456',
|
||||
]);
|
||||
$fs = new FileSystem();
|
||||
if (!$fs->exists(public_path('assets/profile-images/aaronparecki.com'))) {
|
||||
$fs->makeDirectory(public_path('assets/profile-images/aaronparecki.com'));
|
||||
}
|
||||
$fs->copy(
|
||||
base_path('tests/aaron.png'),
|
||||
public_path('assets/profile-images/aaronparecki.com/image')
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue