If you have set $fillable on the model you can use create
https://laravel.com/docs/7.x/eloquent#mass-assignment
Also set your relationships
https://laravel.com/docs/7.x/eloquent-relationships#one-to-many
namespace App\Http\Controllers;
use App\Models\Category;
use App\Http\Requests\CategoryFormRequest;
use Illuminate\Support\Facades\Auth;
public function store(CategoryFormRequest $request)
{
$category Auth::user()->categories()->create($request->all());
return redirect()->route('categories.show', $category);
}
public function show(Category $category)
{
return view('categories.show', compact('category'));
}
And after create it will be better if you redirect to the show method.