Skip to content

Commit 79efbe6

Browse files
committed
include our sucky function
1 parent d7f7b9b commit 79efbe6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

app/functions.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3+
use App\Entries;
34

5+
function InsertINTODB($i, $w, $h,$a, $d){
6+
$p = new Entries();
7+
$p->photoid = $i;
8+
$p->Width = $w;
9+
$p->Height = $h;
10+
$p->Votes = 0;
11+
$p->Author = $a;
12+
$p->Description = $d;
413

5-
InsertINTODB($i, $w, $h,$a, $d){
6-
14+
$p->save();
715
}
816

917
?>

resources/views/welcome.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

4545
@php
4646
47+
require(app_path(). '/functions.php');
48+
4749
$cache_key = 'photos-cache-key';
4850
$faker = \Faker\Factory::create();
4951

0 commit comments

Comments
 (0)