Skip to content

Tag: laravel-4

Laravel, how to ignore an accessor

I have a model with a custom accessor so I get that custom attribute, But now, in one case, I need to get only some fields, without this OrderContents one. But doing it this way, it returns me the OrderContents as well.. is there a way to not get that field? Thanks! Answer There’s no way to do it in

Use one Laravel migrations table per database

I work in a project that uses multiple databases. It seems like Laravel only uses the migrations-table in the database that is set as default. I would like one migrations table per database that logs the migrations that have been done to that specific database. Is this possible? I have defined the databases i…

Select box with first option empty

How can I set the first option in my select box to an empty value? I’m getting the data from my DB, and I would like to set the option by default as “Please select one option”. Answer I found that ‘default’=>’Please select’ doesn’t work with the HTML5 require…