Hi freelancers,
I am looking for freelancers to help me with simple programming tasks on the longer run.
I am developing a recipe site (Laravel 5.2, PHP 5.6), and I need a search functionailty. Given a list of ingredients, this search function should return the list of those recipes, that contain all the given ingredients.
The recipes and the ingredients are stored in a database, and there is a pivot table telling which ingredients are used for which recipe.
The relevant part of the database schema is this:
Schema::create('recipes', function (Blueprint $table) {
$table->increments('id');
$table->text('name');
$table->text('url');
$table->text('content');
$table->text('file_name');
$table->unsignedInteger('user_id');
$table->unsignedInteger('minutes');
$table->unsignedInteger('price');
$table->unsignedInteger('servings');
$table->text('imported_doc');
$table->boolean('import_warning');
$table->timestamps();
$table->foreign('user_id')
->references('id')
->on('users');
});
Schema::create('ingredients', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->unsignedInteger('group')->nullable()->index();
$table->foreign('group')->references('id')->on('ingredients')->onDelete('cascade');
$table->boolean('pure_group');
$table->timestamps();
});
Schema::create('ingredient_recipe', function (Blueprint $table) {
$table->unsignedInteger('ingredient_id')->nullable()->index();
$table->foreign('ingredient_id')->references('id')->on('ingredients')->onDelete('cascade');
$table->unsignedInteger('alternate_id')->nullable()->index();
$table->foreign('alternate_id')->references('id')->on('ingredients')->onDelete('cascade');
$table->unsignedInteger('recipe_id')->index();
$table->foreign('recipe_id')->references('id')->on('recipes')->onDelete('cascade');
$table->unsignedInteger('amount')->nullable();
$table->boolean('optional');
});
On the front end I need a search field with auto comple function, and a search. With this field the user can input the ingredient one by one, and then start the search by clicking on the search button.
You can query the list of ingredients with a REST API. http://{baseurl}/ingredients/list/{search_term} will return the list of ingrendients whose nem contains the search term in the following fom:
{
"id":978,
"name":"rizsborecet",
"default_unit":"42",
"units":[
{
"id":6,
"name":"ml"
},
{
"id":7,
"name":"dl"
}
],
"group":[
{
"name":"Ecet\/dresszing",
"id":87
}
]
}
from this only, the name and the id is important for this task.
For the autocomple feature use JQuery autocomplete: [login to view URL]
The search result should contain the name and url of the recipes.
Write unit test for this feature!
There is no need to "design" the UI, but use bootstrap wherever possible.
Workflow
- Sign up to GitLab
- You will be added to the project
- Fork the project
- Make your changes
- Test your changes
- Create a merge request
Applying
In your application please include:
- Estimated amount of work hours needed to complete this task
- I you have one, then include your most relevant Project. (Strictly only one!)
I will answer every application!
Good Luck
Dear Sir,
Hope you are doing well, I have read your job description, I am willing to work with you. I have already done similar job and win 5 star rating with wonderful review.
Key Responsibilities are :
- I ll complete all of your requirements
- I ll do more tweaks for you as well
Sir i ensure you that i am best suit for this post. Please open chat with me so we can discuss more in details
Looking forward to hear from you.
Best Regards,
Waheed Gondal