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
Tag: laravel-4
Laravel PHP: multiple project run at the same time [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last month. Improve this question I want…
Dropping column with foreign key Laravel error: General error: 1025 Error on rename
I’ve created a table using migration like this: I need to change this table and drop the foreign key reference & column pick_detail_id and add a new varchar column called sku after pick_id column. So, I’ve created another migration, which looks like this: When I run this migration, I get the f…
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…
Laravel Mail::send() sending to multiple to or bcc addresses
I can’t seem to successfully send to multiple addresses when using Laravel’s Mail::send() callback, the code does however work when I only specify one recipient. I’ve tried chaining: and passing an array: but neither seem to work and I get failure messages when returning Mail::failures(), a …
Laravel Ajax Call to a function in controller
I am new to laravel and I want to make an ajax call to a function written in controller. I have done the following but not working. In View : $.ajax({ type: “POST”, url: ‘OrderData’, // Not …
Laravel – Multiple User Logins Under One Main User Account
My application has the structure of monthly subscriptions that give you a single “admin” account login responsible for billing. Under that main user account, there can be numerous employees, some, …
Set Expected Exception in Codeception Functional Cept
I want to do something like: In a functional cept. Any chance to do so? Above code will work in isolation but if I run codecept run, the tests get stuck once the test with the expected exception is complete. Here’s my setup: YML: Answer I think this is a known problem with the Laravel 4 module for codec…
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…
Laravel Controller doesn’t exist, even though it clearly exists
The error I’m getting is that the controller doesn’t exist even though I know it does, here’s the code. Route.php Route::get(‘mdpay/template’, array(“uses” => “templateController@index”)); …