Reputation: 21126
I am using Laravel.
Due to it being MVC, I am passing a model (an object) of a certain class type into the view.
Of course, inside my view... it has no idea what the controller has pushed out when i'm developing, so I lose my typeahead on my ViewModels...
I tried doing something like this:
(TimesheetViewModel)$Model;
But unfortunately that doesn't work...
What I end up having to do is declare a $Model = new TimesheetViewModel();
just to help me develop the page and then get rid of it at the end. It's dumb... Any good ways of helping out my typeahead?
Upvotes: 0
Views: 441
Reputation: 2694
Using PHP doc: At the beginning of the view:
<?php
/* @var $model TimesheetViewModel */
?>
Upvotes: 2