razorcreations / nova-ajax-field Goto Github PK
View Code? Open in Web Editor NEWA searchable AJAX powered field for Laravel Nova
A searchable AJAX powered field for Laravel Nova
After adding a record in the database, it's showing the ID's in the table. How can I use (belongsTo) so that it should show user name instead of the user_id?
I'm using this to search my users and return the value with id and email in pair.
AjaxField::make('Foo')->setUrl('/api/ajaxselect/users?search=Jon')
My questions is how to secure the api route? I used 'nova' middleware in my routes/api.php file. but it's not working.
Any help will be appreciated.
Thanks,
Ahmed
Could you please give some more detail to use this package.
By using the searchable() method in a BelongsTo field Iam getting the desired result but is slow.
As far as I understand your package overcomes this problem and can make a BelongTo field to show faster the results.
Is that correct?
The request isn't sending the typed values to the API endpoint.
Not even the parent id is being sent.
I've been trying to pass a parent param into the ajax request but I can't seem to find the value on the server side.
Goal is to get a list of contacts from HubSpot based on the selected Report Type.
// Route
Route::get('hubspot/contact-lists-test/', 'API\APINovaController@get_hubspot_contact_list_by_report_type')->name('api.hubspot.contact.list.by.id.test');
// controller
public function get_hubspot_contact_list_by_report_type(Request $request)
// nova page
Select::make('Report Type', 'report_type_id')->options($trReportTypes),
AjaxField::make('HubSpot List', 'hs_list_id')
->setUrl('/api/nova/hubspot/contact-lists-test')
->parent('report_type_id')
->typeInt(),
I believe my issue is with how the Route is set up into the controller. Could you review and let me know?
Nova Version: 2
Laravel Version: 6
PHP Version: 7.4
What is import field path ?
This is message:
Class "App\Nova\AjaxField" not found
When I add
use Racorcretions\AjaxField;
message is the same.
Add it to readme.
AjaxField::make('Foo')
->placeholder('Your custom placeholder')
In FormFiled.vue, set :
:placeholder="field.placeholder || field.name"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.