Skip to content

Instantly share code, notes, and snippets.

@salipro4ever
Created October 10, 2018 10:40
Show Gist options
  • Save salipro4ever/03d65123782550c8db01be1e35853b22 to your computer and use it in GitHub Desktop.
Save salipro4ever/03d65123782550c8db01be1e35853b22 to your computer and use it in GitHub Desktop.
class ProjectController extends Controller
{
    /**
     * All of the current user's projects.
     */
    protected $projects;

    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware(function ($request, $next) {
            $this->projects = Auth::user()->projects;

            return $next($request);
        });
    }
}
@salipro4ever
Copy link
Author

function debug_string_backtrace() {
        try {
            throw new \Exception();
        } catch (\Exception $e) {

            dump($e->getTraceAsString());
        }


    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment