2016-05-19 15:01:28 +01:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
|
|
class NotesTableSeeder extends Seeder
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the database seeds.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function run()
|
|
|
|
|
{
|
|
|
|
|
factory(App\Note::class, 10)->create();
|
|
|
|
|
$noteWithPlace = App\Note::create([
|
2017-02-03 16:42:39 +00:00
|
|
|
|
'note' => 'Having a #beer at the local. 🍺',
|
2016-11-22 16:08:02 +00:00
|
|
|
|
'tweet_id' => '123456789',
|
2016-05-19 15:01:28 +01:00
|
|
|
|
]);
|
|
|
|
|
$place = App\Place::find(1);
|
|
|
|
|
$noteWithPlace->place()->associate($place);
|
|
|
|
|
$noteWithPlace->save();
|
|
|
|
|
$noteWithContact = App\Note::create([
|
|
|
|
|
'note' => 'Hi @tantek'
|
|
|
|
|
]);
|
|
|
|
|
$noteWithContactPlusPic = App\Note::create([
|
|
|
|
|
'note' => 'Hi @aaron',
|
|
|
|
|
'client_id' => 'https://jbl5.dev/notes/new'
|
|
|
|
|
]);
|
|
|
|
|
$noteWithoutContact = App\Note::create([
|
|
|
|
|
'note' => 'Hi @bob',
|
|
|
|
|
'client_id' => 'https://quill.p3k.io'
|
|
|
|
|
]);
|
|
|
|
|
//copy aaron’s profile pic in place
|
|
|
|
|
$spl = new SplFileInfo(public_path() . '/assets/profile-images/aaronparecki.com');
|
|
|
|
|
if ($spl->isDir() === false) {
|
|
|
|
|
mkdir(public_path() . '/assets/profile-images/aaronparecki.com', 0755);
|
|
|
|
|
copy(base_path() . '/tests/aaron.png', public_path() . '/assets/profile-images/aaronparecki.com/image');
|
|
|
|
|
}
|
2016-10-24 18:35:48 +01:00
|
|
|
|
$noteWithCoords = App\Note::create([
|
|
|
|
|
'note' => 'Note from somehwere',
|
|
|
|
|
'location' => '53.499,-2.379'
|
|
|
|
|
]);
|
2017-06-17 14:34:33 +01:00
|
|
|
|
$noteSyndicated = App\Note::create([
|
|
|
|
|
'note' => 'This note has all the syndication targets',
|
|
|
|
|
'tweet_id' => '123456',
|
|
|
|
|
'facebook_url' => 'https://www.facebook.com/post/12345789',
|
|
|
|
|
'swarm_url' => 'https://www.swarmapp.com/checking/123456789',
|
|
|
|
|
'instagram_url' => 'https://www.instagra.com/p/aWsEd123Jh',
|
|
|
|
|
]);
|
2016-05-19 15:01:28 +01:00
|
|
|
|
}
|
|
|
|
|
}
|