⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


AlokNikhil

Member Since 10 Jul 2018
Offline Last Active Dec 30 2020 07:49 PM
-----

Topics I've Started

Getting setRelation field Value instead of ID in callback_before_insert

26 December 2020 - 09:27 PM

Hello Everyone

Before asking here I searched a lot on Internet however didn't got any solution.

 

Question: How to get book_name instead of book_id in callback_before_insert function?

 

Code line is 

$crud->setRelation('book_id','master_books','book_name');

Problem Statement: I want to create slug field value using book_name but not able to figure out that how to pass book_name instead of book_id in callback_before_insert function.

 

Thanking you in anticipation.