Support the ongoing development of Laravel.io →
posted 9 years ago
Database
Last updated 1 year ago.
0

Try using \Page::model (be sure to include the backslash "") a Laravel 5 app works in a namespaced environment.

Last updated 9 years ago.
0

Thanks,

I tried $row = \Page::where('zone_id','=',4)->first()

But it still fails with Class 'Page' not found

0
Solution

I resolved this using \App\Page::where('zone_id','=',4)->first()

Thank you

0

Sign in to participate in this thread!

Eventy

Your banner here too?

frocco frocco Joined 3 Feb 2014

Moderators

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.

© 2024 Laravel.io - All rights reserved.