This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267435 - Laravel Object Type
Summary: Laravel Object Type
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.2
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-04 23:50 UTC by spad87
Modified: 2016-08-04 23:50 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spad87 2016-08-04 23:50:37 UTC
I'm using NetBeans to work on a Laravel 5 project.
Despite other custom project I worked on, I’m not able to make the IDE understand the type of objects.

For example, I have a class “Page” that extends “Illuminate\Database\Eloquent\Model”. If I wrote:
$page = Page::where(“title”, “temp”)->first();
the variable $page now is an object of Page class, so I should be able to have intellisense suggesting me attributes and methods: 
$page->[autocomplete_here]
but nothing happens. 

If I write:
$page = new Page(); 
now I’m able to see the suggestions (but I can’t use this form due to the way Laravel works). 

Another workaround I found is to define the variable in a comment just before using it:
/* @var $page Page */
but this is impossible to do every time a need a new object.

Is there a way to make NetBeans understands the type of the variable automatically from the first example? Is it clear what I mean?

Thank you for your support,
Fabio