I try using Eloquent in routes.php, but I got a message:
InvalidArgumentException
Database [bootstrap] not configured.
My code is below:
$shop = Shop::where('pid', '1')->first();
Please help me. Thank you very much.
Seems like you missed configuring the database correctly.
Assuming you are on Laravel 4.0 / 4.1 / 4.2, and that you have already setup your database, go to:
app/config/database.php
and check there if you have correct credentials.
Alternative: Maybe you are using the enviroment settings, in that case, check for the database.php files in the directory inside of app/config that corresponds to your current enviroment.