I have problem to pass two varialbles with “with” in Redirect::route… Here is my code… How to do this Here is error: Undefined variable: cartItems (View: C:xampphtdocslaravel-webshoplaravelappviewscart-success.blade.php) CONTROLLER View Answer You may try this: Or this:
Tag: laravel
Installing Composer OpenSSL Issue
I am trying to install composer however when I go to install it I get this error: I currently have php 5.4.31 and I am running WAMP2.2 I’ve checked my php.ini file in the bin/php/php5.4.31/ and ensured that the following line is uncommented: The error still resolves and I’m at a loss as to how I c…
How to give custom field name in laravel form validation error message
I was trying form validation in laravel. I have a input text field in my form called ‘Category’ and i’m given the field name as ‘cat’ as short. And i defined the validation rules like this. When the validation fails i’m getting error message like this But i want to display …
Laravel Simple Month Selection
y tried retrieve month from date field “fechas” (datetime type) where testing with SQL clause MONTH not works… thanks for replies Answer You could use the hide gem whereMonth: I highly recommend to you read the Builder.php source to search for another gems. 🙂 https://github.com/laravel/frame…
Recurring permissions problems w/ Laravel on vagrant box
I’m getting some strange permissions problems. I’m using Laravel on a vagrant box. I regularly have to reset my app/storage permissions. Here’s my process: in terminal, run sudo chmod -R 777 app/…
Laravel Shared Hosting .htaccess
I am trying to deploy a Laravel project onto a share hosting, I’ve managed to get most of the hard work done but I cannot strip off the /public directory without a Forbidden issue. The website works and shows same pages for these links www.mywebsite.com/test/index.php www.mywebsite.com/test/public/ But …
How do i use conditional parameters in Laravel Auth::attempt?
Using Laravel 4.1.30 I got this following code which test a sign-in attempt via Auth. I like to implement a conditional value such as: I am using the active (field) as a level of authentication for users signing in. Anything above 0 (zero) should satisfy the next condition. How can it be done in one statement…
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 Form Validation, fail if not empty
I have an input field which needs to be empty, otherwise I want the validation to fail. This is an attempt at stopping spam through a contact form. I’ve looked at the documentation for the validation but there’s nothing to do this, other than the “max” rule, but this doesn’t work…