D
D
Dadoshik2017-07-20 18:27:05
Laravel
Dadoshik, 2017-07-20 18:27:05

How to generate a given number of promo codes?

There is a Git package
Installed. Completed the configuration.
But I ran into a problem when creating promos:
Controller

public function promocodes_save(Request $r) {
    $amount = $r->get('amount');
    $reward = $r->get('summReward');
    
  Promocodes::create($amount, $reward);
        return redirect()->route('promocodes');
    }

Error: Class 'App\Http\Controllers\Promocodes' not found
Tell me what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dave, 2017-07-20
@djay

Tell me what's wrong?

Forgot to import the
use app\Promocodes model; // Or where this model is located

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question