Skip to content

Instantly share code, notes, and snippets.

@thewinterwind
Created May 27, 2014 06:57
Show Gist options
  • Select an option

  • Save thewinterwind/9dbc9265101f826740c3 to your computer and use it in GitHub Desktop.

Select an option

Save thewinterwind/9dbc9265101f826740c3 to your computer and use it in GitHub Desktop.

Revisions

  1. thewinterwind created this gist May 27, 2014.
    29 changes: 29 additions & 0 deletions gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    <?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);
    }

    }