Created
May 27, 2014 06:57
-
-
Save thewinterwind/9dbc9265101f826740c3 to your computer and use it in GitHub Desktop.
sample controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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