Recently i working on a big project for myself with laravel framework. I was really happy when i discovered the laravel framework, this is really amazing framework, So much helpful things in one framework.
But, I have a question for a long time. How can i add new classes? To explain my question, i will give you an example:
class articleController extends Controller
{
public function bla()
{
$a = new MyNewClass($colorfulVariable);
$b = $a->createSomething(new MySecondNewClass());
}
}
Now, the classes MyNewClass and MySecondNewClass is not really exists, but i want to create them, use them in every controller i want, just like i use the Redirect or Request classes that Laravel offers.
How can i create this classes? Make a new functions to use them in my laravel project?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire