I store the data correctly but when I try to get a data in edit function it shows me this error SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘staff.staff_id’ in ‘field list’ (SQL: select users.*, staff.staff_id as pivot_staff_id, staff.user_id as pivot_user_id, staff.staff_type as pivot_staff_type, staff.role as pivot_role, staff.created_at as pivot_created_at, staff.updated_at as pivot_updated_at from users inner join staff on users.id
Tag: laravel-4
Trying to get property ‘page’ of non-object while using session variable
I am trying to put $request in the session variable but when I try to get in the controller its showing error Trying to get property ‘page’ of non-object. code below Session::put(‘request’, $request-&…
Laravel redirect()->intended() is not working in custom login controller
I have a custom login controller and its using return redirect()->intended(route(‘home’)) , as per the documentation this should send the user redirect the user to the URL they were attempting to access before being intercepted by the authentication middleware. But for my case every time it is redirecting to home route.I am sure i have done correctly or at least
Decrease product quantity in database after order is placed with Laravel
I have cart on the site and so far everything work perfectly. Now I’m trying to make quantity for each product which admin can add in backend ( already done ) and when customer order product(s) to …
Required_if laravel with multiple value
I have a dropdown menu like this:
How to properly merge multiple collections in Laravel
I want to merge multiple collections into one. I do have a solution, which is the following: This actually does work, but I run into problems in cases where some or all of the collections contain no objects. I get an error along the lines of call to merge() on non object. I actually tried to create an array of
Getting error when sending an email in Laravel 4.2
I have an error in Laravel when I am sending an email. I have a form with a select tag and when I select the user and click submit I need to send him a mail after I select it. Here is my …
retrieving multiple records associated to multiple records laravel 4.2
recently i asked this question which got one answer but unfortunately didn’t solve the problem, after that i got no more answers and i really need to fix this problem i have. Alright so i have to make a quiz website for my school in which a user should be able to play the quiz, this page need to show
Redirect to external URL with return in laravel
I am trying to send one time password to a user using SMS INDIA HUB API. For that purpose I need to redirect to a URL format: http://cloud.smsindiahub.in/vendorsms/pushsms.aspx?user=abc&password=…
Laravel “artisan make:observer” fails
I am trying to generate a provider using Artisan as described on the documentation page [1] by running: php artisan make:observer AdServiceProvider However I get the following error: […