Hi, I'm a new developer in Laravel. I made a Portfolio Management system in Personal Banking for our course in University. Everything looks fine but I have a little problem in "Add Costumer" part.
In my "Add Costumer" part, I have a five input area. That's,
When the user click "Save" button, my controller generate random custom number and this number put in "customer_no" field.
$group_id = Auth::user()->id;
$number = rand();
$collection = collect($request->all());
$collection -> put('customer_no', $number); // Random Customer No
$collection -> put('user_id', $group_id); // For Relationship
return dd(Customer::create($collection -> all()));
My problem start in "Customer ID" input area. Because, When I click save button, customer id field was making wrong insert. It's always insert same number "2147483647". Also, I checked my return dd result. I can see right customer id number in my array.
For ex,
The value I entered -> 19212364187 Saved in database -> 2147483647
I can't resolve this problem. Could you help me for this? I tried "php artisan clear:cache, php artisan migrate:reset" but doesn't work.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community