1.3 - Getting to Green

This commit is contained in:
Adam Wathan
2016-11-01 17:53:51 -04:00
parent e257fdd512
commit b49dcfabe3
7 changed files with 83 additions and 3 deletions

11
app/Concert.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Concert extends Model
{
protected $guarded = [];
protected $dates = ['date'];
}

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers;
use App\Concert;
use Illuminate\Http\Request;
class ConcertsController extends Controller
{
public function show($id)
{
$concert = Concert::find($id);
return view('concerts.show', ['concert' => $concert]);
}
}