I want to rename a table in Laravel 4, but don\'t know how to do that.
The SQL is alter table photos rename to images. If there is an Eloquent solution,
In the Laravel 4 manual - it talks about doing raw commands like this:
DB::select(DB::raw('RENAME TABLE photos TO images'));
edit: I just found this in the Laravel 4 documentation which is probably better:
DB::statement('drop table users');
Update: In Laravel 4.1 (maybe 4.0 - I'm not sure) - you can also do this for a raw Where query:
$users = User::whereRaw('age > ? and votes = 100', array(25))->get();
Further Update If you are specifically looking to do a table rename - there is a schema command for that - see Mike's answer below for that.