Initial commit to new repo
This commit is contained in:
parent
a267f9bfcc
commit
a5173c981b
292 changed files with 17472 additions and 0 deletions
1
database/seeds/.gitkeep
Normal file
1
database/seeds/.gitkeep
Normal file
|
@ -0,0 +1 @@
|
|||
|
23
database/seeds/ArticlesTableSeeder.php
Normal file
23
database/seeds/ArticlesTableSeeder.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ArticlesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('articles')->insert([
|
||||
'titleurl' => 'my-new-blog',
|
||||
'title' => 'My New Blog',
|
||||
'main' => 'This is my new blog. It uses `Markdown`.',
|
||||
'published' => 1,
|
||||
'created_at' => '2016-01-12 15:51:01',
|
||||
'updated_at' => '2016-01-12 15:51:01',
|
||||
]);
|
||||
}
|
||||
}
|
21
database/seeds/ClientsTableSeeder.php
Normal file
21
database/seeds/ClientsTableSeeder.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ClientsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('clients')->insert([
|
||||
'client_url' => 'https://jbl5.dev/notes/new',
|
||||
'client_name' => 'JBL5',
|
||||
'created_at' => '2016-01-12 16:03:00',
|
||||
'updated_at' => '2016-01-12 16:03:00',
|
||||
]);
|
||||
}
|
||||
}
|
32
database/seeds/ContactsTableSeeder.php
Normal file
32
database/seeds/ContactsTableSeeder.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ContactsTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('contacts')->insert([
|
||||
'nick' => 'tantek',
|
||||
'name' => 'Tantek Çelik',
|
||||
'homepage' => 'http://tantek.com',
|
||||
'twitter' => 't',
|
||||
'created_at' => '2016-01-12 16:11:00',
|
||||
'updated_at' => '2016-01-12 16:11:00',
|
||||
]);
|
||||
|
||||
DB::table('contacts')->insert([
|
||||
'nick' => 'aaron',
|
||||
'name' => 'Aaron Parecki',
|
||||
'homepage' => 'https://aaronparecki.com',
|
||||
'twitter' => 'aaronpk',
|
||||
'created_at' => '2016-01-12 16:12:00',
|
||||
'updated_at' => '2016-01-12 16:12:00',
|
||||
]);
|
||||
}
|
||||
}
|
20
database/seeds/DatabaseSeeder.php
Normal file
20
database/seeds/DatabaseSeeder.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(ArticlesTableSeeder::class);
|
||||
$this->call(ClientsTableSeeder::class);
|
||||
$this->call(ContactsTableSeeder::class);
|
||||
$this->call(PlacesTableSeeder::class);
|
||||
$this->call(NotesTableSeeder::class);
|
||||
}
|
||||
}
|
39
database/seeds/NotesTableSeeder.php
Normal file
39
database/seeds/NotesTableSeeder.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?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.'
|
||||
]);
|
||||
$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');
|
||||
}
|
||||
}
|
||||
}
|
23
database/seeds/PlacesTableSeeder.php
Normal file
23
database/seeds/PlacesTableSeeder.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PlacesTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('places')->insert([
|
||||
'name' => 'The Bridgewater Pub',
|
||||
'slug' => 'the-bridgewater-pub',
|
||||
'description' => 'A lovely local pub with a decent selection pf cask ales',
|
||||
'location' => 'POINT(-2.3805 53.4983)',
|
||||
'created_at' => '2016-01-12 16:19:00',
|
||||
'updated_at' => '2016-01-12 16:19:00',
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue