Waldemar
3 years ago
2097
8
Laravel

Category->id before save

Posted 3 years ago by Waldemar

Hi i need add category ID before save

$category = new \App\Categories;
$category->title = Input::get('title');
$category->path = Slug::make(Input::get('title'));
$category->real_name = Input::get('real_name');
$category->description = Input::get('description');
$category->content = Input::get('content');
$category->type = Input::get('type');
$category->categories_order = $category->id; // here i need insert ID category->id
$category->save();

Please sign in or create an account to participate in this conversation.