Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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