jonnybarnes.uk/database/seeds/NotesTableSeeder.php
Jonny Barnes c0a4e220c4 Squashed commit of the following:
commit fea85fa8a47b4ccedb2b502b4537c6b261dc3eed
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Fri Feb 3 16:41:57 2017 +0000

    Make emoji more accessible

commit 2bcb6e999b85aad361754f667ab8305db538176f
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Fri Jan 27 20:51:50 2017 +0000

    Add an emoji into the seed file to test a11y
    techniques with.
2017-02-03 16:42:39 +00:00

44 lines
1.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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([
'note' => 'Having a #beer at the local. 🍺',
'tweet_id' => '123456789',
]);
$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 aarons 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');
}
$noteWithCoords = App\Note::create([
'note' => 'Note from somehwere',
'location' => '53.499,-2.379'
]);
}
}