Support the ongoing development of Laravel.io →
thepsion5

thepsion5

Joined 3 Feb 2014

Statistics

Threads 1
Replies 119
Solutions 13
Articles 0

[EXERCISE] Refactoring Exercise #1 is Complete! Discuss.

After some interest in the Laravel subreddit, I've decided to run a refactoring exercise a few times...

0 Likes
5 Replies
replied 11 years ago

Error: Using $this when not in object context

DrPrez said: Sorry my bad, correct way is... public static $variable = 'value'; public static fun...

1 Likes
replied 11 years ago

Error: Using $this when not in object context

You could try and define $table as a static variable. Or could use something like this: public funct...

0 Likes
replied 11 years ago

View::make('x', $viewData) vs. View::make('x')->with('viewData', $viewData);

These two pieces of code are equivalent: $viewData = array('foo' => $bar); return View::make('x',...

0 Likes
replied 11 years ago

Error: Using $this when not in object context

$table is an instance variable, not a static variable, so you can't use it in a static function (bas...

0 Likes
replied 11 years ago

Get table name that is using scope (inside of scope)

jarektkaczyk said: First off, you don't need to return anything from the scope (however you may do...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.