Support the ongoing development of Laravel.io →
IOC Forms Architecture
Last updated 2 years ago.
0

I think I know what you're looking for, but it would be much better if you post an example code to eliminate any miscommunication.

Last updated 2 years ago.
0

Guess it depends on your site, what defines a customer? If you have an ecommerce site, is someone that created an account? If so you wouldn't even need to create a customer, because all of your users are potential customers. The users table could have a one-to-many relationship with an orders table. Just one option. You could inject the order repository into your controller:

public function __construct(OrderRepositoryInterface $order)
{
    $this->order = $order;
}

public function store()
{
    $this->order->create(Auth::user()->id, Input::all());
}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.