Skip to content

Instantly share code, notes, and snippets.

@thewinterwind
Created May 27, 2014 06:57
Show Gist options
  • Save thewinterwind/9dbc9265101f826740c3 to your computer and use it in GitHub Desktop.
Save thewinterwind/9dbc9265101f826740c3 to your computer and use it in GitHub Desktop.
sample controller
<?php
use Leads\Repos\LeadRepoInterface;
use Illuminate\Foundation\Application;
class ExchangeController extends BaseController {
private $lead;
private $app;
public function __construct(LeadRepoInterface $lead, Application $app)
{
$this->lead = $lead;
$this->app = $app;
}
public function index()
{
$data['leads'] = $this->lead->get();
$data['headers'] = $this->lead->headers();
$data['title'] = strtoupper($this->app->request->segment(1)) . ' Leads';
$data['description'] = 'Free ' . $this->app->request->segment(1) . ' leads for professionals in the ' . $this->app->siteinfo->industry . ' industry';
return View::make('exchange.index', $data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment