Skip to content

Instantly share code, notes, and snippets.

@simonhamp
Last active February 6, 2016 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonhamp/795e8d7c3c36fcf0e95e to your computer and use it in GitHub Desktop.
Save simonhamp/795e8d7c3c36fcf0e95e to your computer and use it in GitHub Desktop.
<?php
trait AuthenticatesUsers {
public function getLogin() {
if (view()->exists('auth.authenticate')) {
return view('auth.authenticate');
}
return view('auth.login');
}
}
<?php
class Foo {
use AuthenticatesUsers;
public function getLogin() {
// Do my stuff
parent::getLogin();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment