AbdulBazith

Experience

6,650

0 Best Reply Awards

  • Member Since 4 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

12th October, 2018

AbdulBazith started a new conversation Laravel Validated With Integer And Entered Integer, But Not Accepting ? • 3 days ago

Guys iam working with a project in that, in store function in resource controller i given validation integer required

 'employee_phno'=>'required|integer',

and from form if i enter 9999999999(10 digits). mobile number is 10 digits.

if i give this its not accepting it showing the error

Errors:
The employee phno must be an integer.

why?

is there some other datatype to give mobile numbers which accepts 10 digits

AbdulBazith left a reply on Is One User Table Is Enough For Both Employee And Employer In Laravel • 3 days ago

@D9705996 thank you for your response..

Let me view the link

11th October, 2018

AbdulBazith left a reply on How Can I Make Controller For My Multiple Tables • 4 days ago

@kvithalani thank you so much for your reply

s i to thought like that only..

thank you thank you..

AbdulBazith started a new conversation Is One User Table Is Enough For Both Employee And Employer In Laravel • 4 days ago

Guys iam working with a project, job portal site.

how can i keep the users(login) table.

i have two signup form separately. 1 for employee and 1 for employer.

whats my doubt is how can i make the users table.

i thought to keep like below mentioned


users_table

id
name
email_id
password
type_of_user

is this right format. else i need to give two tables for them for authentication.

Kindly suggest please...

AbdulBazith left a reply on How Can I Make Controller For My Multiple Tables • 4 days ago

@skoobi

I forget to say,

i have different forms for each one. that is

personal details form 
education details form
certification details form
experince details form

like so on,

so that i think different controller will be best. i think so.

AbdulBazith left a reply on How Can I Make Controller For My Multiple Tables • 4 days ago

@skoobi thank you for your response. but can you explain me some what clearly.

please.

But what i thought is to have diffenrent controllers because, each and every table has a delete, update, edit, insert. so for each table each resource controller will be better i thought. iam not sure.

Can you explain me clearly please about you opinion..

AbdulBazith started a new conversation How Can I Make Controller For My Multiple Tables • 4 days ago

Guys I am working with project, it is a job portal site.

Whats my doubt is

  1. Whether to keep one controller or different controllers for processing job seeker. Because i have many tables for job-seeker.

This is my tables for job seeker,

Account_information  // Table Name

job_seeker_id(pk)
first_name
last_name
gender
phno1
phno2
email_id
image




Seeker_school_details // Table Name

school_id(pk)
job_seeker_id(fk)
education
board
medium
percentage
passing_year




seeker_college_details  // Table Name

college_id(pk)
job_seeker_id(fk)
education
course
specialization
institute
course_type
percentage
passing_year



seeker_experince_details  // Table Name

experince_id(pk)
job_seeker_id(fk)
designation
company
notice_period
description


seeker_address_details  // Table Name

address_id(pk)
job_seeker_id(fk)
address_type
address
city
state
country


 
skill_set_details // Table Name

skill_id(pk)
job_seeker_id(fk)
level

The above mentioned are the tables for job-seeker. for this i need to create each controller for each table or one controller is enough with user defined functions for (create delete, and update).

Kindly some one suggest your ideas please

17th September, 2018

AbdulBazith left a reply on Doubt In Table Relationship In Laravel? • 4 weeks ago

@tykus understood and thanks.

Another doubt,

i have the course details such as

education -

specialization-

The education contains B.Sc, BE, M.Sc and soo on.

and the specializtion contains maths, physics, civil etc..

whats my doubt is

i planned to have a table like

Qualification with fields(education_name, specialization_name)

but when filling the data the specialization is repeated.

see

education_name specialization_name Bsc, maths Bsc, physics Msc, maths Msc, physics

so the see the above example the specialization is repeated

so how can i make a table and relationship for this qualification details

Simply to say job-seeker chooses the education from drop down and based on that drop down then next drop down specialization will be listed?

so need suggestion for table structure and relationship among them.

AbdulBazith left a reply on Doubt In Table Relationship In Laravel? • 4 weeks ago

@tykus thanks for you suggestion

But mine is many to many relationship so that a seeker can have more than one skill set and a job_positing can post more than one skill_set??

is this possible using polymorphic many to many relationship?

AbdulBazith started a new conversation Doubt In Table Relationship In Laravel? • 4 weeks ago

Guys I am working with a project job portal site.

What’s my doubt is need a suggestion for table relationship.

Actually the project has skill_set table with fields id, name_of_skill_set.

Consider the data are inside the skill_set table

Html
Javascript,
Accounting,
Laravel,
Cakephp
So on.

This skill_set table must be used by both(job_seeker and employer ). Employer uses this skill_set table to post a job with the skill sets requirement and job_seeker uses this table to mention their skill sets.

So I made a relationship in this way is this right. Many-to-many relationship

There are 3 tables

 job_posting table, 
skill_set table, 
job_seeker table

To link the skill_set table for both of them I made two intermediate tables like below,

Job_posting -->Job_skill (Intermediate table) -->skill_set table <--seeker_skill (Intermediate table) <-- Job_seeker

Is this right format or is there any other way to make this process further simple and reliable? Kindly suggest your ideas please..

15th September, 2018

AbdulBazith left a reply on Need Suggestion For Authentication Table For My Application • 1 month ago

@aurawindsurfing ya thank you soo much.

let me start working on it and if needs i will ask any doubts,

Currently i am some what clear with you suggestion

thank you so much..

14th September, 2018

AbdulBazith left a reply on Need Suggestion For Authentication Table For My Application • 1 month ago

@aurawindsurfing thanks for your suggestion.

According to your suggestion i need to place the user_id (id in the users table) from users table to job_posting table..!

Am i right??

So that whenever a user is logged in based on their user id it gives permission?? Am i right?

Whats my doubt is in users table what are the fields i need to have??

and what extra field i need to add in the employer(company) registration table, job_posting table, and job_seeker table based on the authentication purpose?

Kindly reply please.

13th September, 2018

AbdulBazith left a reply on How To Use Registration Form For Two Tables • 1 month ago

@Sergiu17 thank you.

If possible Kindly refer my another post and suggest your ideas please

Need suggestion for authentication table for my application is my post

AbdulBazith started a new conversation Need Suggestion For Authentication Table For My Application • 1 month ago

Guys i am working with a project job portal site. currently handling employer module

I need few suggestions..

i am having two table

Table 1 : Employer_regsitration table with fields

company_id(primary key)
company_name
company_type
industry
company_description
company-address
mobile
landline
logo
email-id

Table 2 : Job_Post table with fields

Job_id(primary key)
company_id(foreign key)
posted_date
job_title
employment_type
job_description
job_location
no_of_vacancies
job_role
education
specialization
skill_set
exp_min
exp_max
salary_min
salary_max
eligibility_description
employer_name
contact_number
email_id

and i need the authentication table. how to fix it..

what i planned is to use the users table with fields

id
name
email
password
user_type(whether employer/job_seeker )

is this the right way. else need to have two table separately for authentication to job-seeker and employer??

for what reason i am asking this because if a employer is logged in and he is going to post a job means how his id is going to be saved in the job_post table(in the field company_id(foreign key)

if i need to maintain two table mean show can i do that in laravel because laravel basically takes cares about authentication.but if i make another table then do i need to write manually for authentication..

kindly some one suggest some idea please please.

The flow of my application is,

when an employer comes in the application he/she should register. confirmation message is sent to his mail id. then he will become member. so after that he can login and post a job, view the posted job, edit the profile, view the resumes of job-seekers..

actually i completed the registration of company and job posting forms(create, edit, update, delete) separately

bu flow i can get it..

kindly some one suggest and help me ..

12th September, 2018

AbdulBazith left a reply on How To Use Registration Form For Two Tables • 1 month ago

@Sergiu17 another small doubt

public function store(Request $request) {
    User::create([
        'name' => $request->company_name,
        'email' => $request->email_id,
        'password' => Hash::make($request->phone_number),
    ]);
  

here i need to add the company registration id also

like

'company_registration_id' =>"?" // here(in the place of question mark) what i need to give to

store the company id(its primary key) to store in the users table

AbdulBazith left a reply on How To Use Registration Form For Two Tables • 1 month ago

Thank youuuu sooo much @Sergiu17 ...

AbdulBazith left a reply on How To Use Registration Form For Two Tables • 1 month ago

@Sergiu17 thank you sooo much, great explanation man..

actually i followed the second method in my old project as well as in my new project..

and another doubt in my registercontroller.php

protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
        ]);
    }


the password is encrypted using 'password' => bcrypt($data['password']), this..

but now i am going to use

'password' => Hash::make($request->phone_number),

is both are same?? else which one is better

why i am asking because security is some what very important to my project that's why

AbdulBazith left a reply on How To Use Registration Form For Two Tables • 1 month ago

@Sergiu17 thank youu soo much for you response

one doubt

for what reason we are giving $fillable array in model??

i referred in google most of the answer is mass assignment is the reason.

what is mass assignment??

11th September, 2018

AbdulBazith left a reply on How Could I Use Model Binding In Native Html In Laravel • 1 month ago

@tykus thank you soo much i understood. but i will validate once again in the update () method

am i right.. then whats the necessary for old()

and kindly refer my another post please and if possible suggest me some ideas.

  1. How to use registration form for two tables

AbdulBazith started a new conversation How To Use Registration Form For Two Tables • 1 month ago

Guys i am working with a project job portal.

I have a register form which has fields such as(company_name, company_type,description, address, email_id, phone number, logo)

when i click submit i have a controller "company_registrationController" in that i have given the sotre method to insert the data i db

at the same time the email-id, phone number,and the name of the company must be inserted into the user table??

how it is possible??

i need to use the email_id as username and phone number as password.

Kindly some one suggest please

10th September, 2018

AbdulBazith started a new conversation How To Use Company Registration Form Values And Username And Password To The User Table In Laravel? • 1 month ago

Guys iam working with a job portal project module employer

basically laravel has a registration form which stores the username and password filed in the users table.

this is what the formal route file


Route::get('Auth/register','Auth\[email protected]') ->name('register');

Route::post('Auth/register','Auth\[email protected]');


basically after filling the registration form it moves to the registercontroller and saves the data in users table

But in my project i have a form company_registration with form fields such as(name, type, sector, description, website, phno, landline, address,email_id,logo).

whats my doubt is while filling the above details. those details must be saved in the company_registration table (i wrote in store method and data saved succesfully), as well as the email id and phone number number data must to be saved in the users table as username and password.

i no need a separate registration form. the company registration form must act as the registration form, only the email_id and phone number must be saved to users table and all other data must be stored in the company registration table

i have controller company_registration. this is the store method

public function store(Request $request)
    {
        $this->validate($request,array(
            'name'=>'required',
            'type'=>'required',
            'industry'=>'required',
            'description'=>'required',
            'city'=>'required',
            'district'=>'required',
            'state'=>'required',
            'country'=>'required',
            'pin'=>'required',
            'mobile'=>'required',
            'landline'=>'required',
            'email_id'=>'required',
            'website'=>'required',
            // 'logo'=>'required'
           ));

           $company_registration=new Company_registration;

           $company_registration->name = trim($request->name);
           $company_registration->type = trim($request->type);
           $company_registration->industry = trim($request->industry);
           $company_registration->description = trim($request->description);
           $company_registration->city = trim($request->city);
           $company_registration->district = trim($request->district);
           $company_registration->state = trim($request->state);
           $company_registration->country = trim($request->country);
           $company_registration->pin = trim($request->pin);
           $company_registration->mobile = trim($request->mobile);
           $company_registration->landline = trim($request->landline);
           $company_registration->email_id = trim($request->email_id);
           $company_registration->website = trim($request->website);



           $image = $request->file('image');
           $filename=time().'.'.$image->getClientOriginalExtension();
           $location=public_path('companylogo/'.$filename);
           Image::make($image)->resize(100,50)->save($location);

           $company_registration->logo=$filename;

          $company_registration->save();
     
    }


how to do this?

Kindly some one suggest

AbdulBazith left a reply on How Could I Use Model Binding In Native Html In Laravel • 1 month ago

@tykus

why cant i can give like this

public function edit($id)
    {
        $company_registration_details = Company_registration::find($id);

        return view('Employer_registration.employer-details-edit')
        ->withcompany_registration_details($company_registration_details);

    }


and in my edit.blade file in each textboxes

value="{{ $company_registration_details->name}}"

value="{{ $company_registration_details->type}}"

value="{{ $company_registration_details->Description}}"

value="{{ $company_registration_details->website }}"

value="{{ $company_registration_details->address}}"

value="{{ $company_registration_details->logo}}"

i can give for each appropriate text boxes by filling it with above codes..

is this the right way?

AbdulBazith left a reply on Is Version Affects The Application Mode Of Working In Laravel? • 1 month ago

@Cronix

assume that his project name is 'ProjectA'. he gave that in pendrive..

What i did is i moved that project in my htdocs folder.

then in htbash i opened that project folder. i followed

https://gist.github.com/hootlex/da59b91c628a6688ceb1

to run the existing project in my computer.. and did this,

composer install
php artisan key:generate
php artisan migrate
php artisan serve

Am i right?? else what i did is wrong?

8th September, 2018

AbdulBazith left a reply on How Could I Use Model Binding In Native Html In Laravel • 1 month ago

@tykus thank you for your response.

May i know for why i need to use old()

value="{{$company->name}}" -> even this works fine is it so?

AbdulBazith started a new conversation How Could I Use Model Binding In Native Html In Laravel • 1 month ago

Guys iam working with a project

i have a table company_registration. inserted the whole date through a form.

now i need to edit it.

in my old project i used

 form::model

to fill the form to edit it.

but here i am using native html tag

so how could i perform the form::model here??

AbdulBazith left a reply on Is Version Affects The Application Mode Of Working In Laravel? • 1 month ago

@Cronix thank you for your response.

ok if i create a new project. i will give specific version. But my friend's project he normally gave in his pen drive so to install the existing his project what should i do?

I moved to the project directory and did

composer install
php artisan key:generate
php artisan migrate
php artisan serve

am i moving i right way?

even though few modules not working. he is saying that version problem. but how could i rectify this??

7th September, 2018

AbdulBazith started a new conversation Problem In Tables For Authentication Process In Laravel • 1 month ago

Guys i am working with a job portal project

this is my schema for company registration table


 $table->increments('id');
            $table->string('name');
            $table->string('type'); // weather its company or consultancy
            $table->string('industry'); // sector IT or something else
            $table->longText('description'); //about the company
            $table->string('city');
            $table->string('district');
            $table->string('state');
            $table->string('country');
            $table->bigInteger('pin');
            $table->bigInteger('mobile');
            $table->bigInteger('landline');
            $table->string('email_id')->unique();
            $table->string('website');
            $table->string('logo');
            $table->timestamps();

this is my users table schema

 Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });

This is my reset password schema

 Schema::create('password_resets', function (Blueprint $table) {
            $table->string('email')->index();
            $table->string('token');
            $table->timestamp('created_at')->nullable();
        });

whats my doubt is

according to my project email-id and mobile number must be the user name and password.

i have a form where all the above company details are filled and stored. while registering only the username and password must be stored. in that while storing in the company_registration table the email id and mobile number must to be stored in users table as user name and password how to do that?? means auth has separate controller, so i am asking such question

and

while a company is logged in, that particular details must be shown so that my question is i need to keep the company_id to the users table so it will refer to the company registration table for that login. am i right??

if yes then i will move on

and i decided to save the job_seekers user name(email-id) and password(mobile) also in the same users table. is this a right way??

but how could job_seeker and company_registration authentication can be in same users table??

Why i am asking here this doubt means if i develop the project in normal php then the authentication process should be done by myself. but in laravel authentication is predefined, so if i edit that any problem occurs??

simply to say, how to maintain a table for authentication of job_seeker and a company_registration(employer). authentication should relate the appropriate job_seeker and company.

if the problem is in coding i can search in google. but here i need suggestion thats why i posted the question.

Kindly suggest all your ideas please..

AbdulBazith left a reply on Is Version Affects The Application Mode Of Working In Laravel? • 1 month ago

@skimuli thanks for your response

can slightly brief it..

6th September, 2018

AbdulBazith started a new conversation Is Version Affects The Application Mode Of Working In Laravel? • 1 month ago

Guys I use the below code to create a new laravel project

Composer create-project laravel/laravel your-project-name

So that a new laravel project is created with version 5.6.*

This way I used in my system. My friend developed a project in the version 5.4.*

When I try to run that project in my system. The route are not working what the problem will be?? some futures are not working. my doubt is few links working and few links not working

I followed the below procedure to run the existing project in my laptop

composer install
php artisan key:generate
php artisan migrate
php artisan serve

in his system if he tries

localhost/Laravel/project-name (laravel is folder name in htdocs)

means it is opened and then he clicks the public folder so that the project runs.

But if I give like that it not works. I need to give localhost:8000 then only it works.

He is saying that mine is 5.6 version and his is 5.4. But each and every time when I create a project I am giving the version then how could its not working?

when his project is run in my system it is in its own version only.

Is there any problem? Do I need to change any settings??

1st September, 2018

AbdulBazith started a new conversation Crudbooster URL Is Not Working In Laravel • 1 month ago

Guys i have opened an existing project of my senior. now he is not here. he done a small application using crudbooster in laravel

Only 3 modules are used. those modules works fine except one.

suppliers products shops purchase

in this first three is correctly redirected

http://localhost:8000/admin/products

http://localhost:8000/admin/shops

http://localhost:8000/admin/suppliers

But the purchase link changed why??

http://localhost/cham/srp/public/admin/purchase/purchase

if i give in the address bar below link it redirects correctly

http://localhost:8000/admin/purchase

but when i click the pruchase module it redirecting to the http://localhost/cham/srp/public/admin/purchase/purchase

and i dont have any folder name cham

whats the problem.

where should i redirect these links in crudbooster. have a correction so i need to open this. this project was done by senior.

I cheked the route file there is no re-directions there

kindly someone help please..

31st August, 2018

AbdulBazith started a new conversation Which Way Is Better To Develop A Job Portal Website. Normal Or CRUDBOOSTER? • 1 month ago

Guys I have successfully completed my milkfarm project with all your help. Thank you guys. Now another project is assigned to me the project is based on concept of job portal website. The module assigned to me is employer module.

My doubt is I done my milkfarm project in normal way in laravel. I used controllers the crud operations using resource command line like this.

Someone suggested me to use CRUDBOOSTER in my new job portal project. I referred in Google and everyone says its powerful, easy, flexible etc, etc. What’s my doubt is whether I can use the CRUDBOOSTER to do a website like job portal. Is it fast?? Whether its performance will be good?? which way is better for my project?

Guys Kindly suggest you valuable suggestions please.

Also if possible Kindly share any video content or link for CRUDBOOSTER please.

Can anyone say somewhat what exactly CRUDBOOSTER does??

Kindly Help.!1

25th August, 2018

AbdulBazith left a reply on Is It Possible To Replace Pagination After Ajax Search In Laravel Like Replacing Body Content In Atable • 1 month ago

@Snapey thank you for your response.

Ya You are ryt, i can reload it. But what i did is i am having two buttons as PDF and EXCEL.

So after my search is done using ajax if i click the pdf or excel button those search result will be downloaded as pdf and excel.

Say for example if i search for a Name="Abdul" it sorts and displays the sorted result in the view through ajax, the name i typed in the text box wont be erased due to ajax request, so i can see the sorted result in the page as well as if i need to download i can give PDF or excel. i think you understood what i am trying to say..

If iam not using ajax, and if i use normal reload i cant make it as pdf or excel. Am I right?? this is what the reason i am using ajax request for my search

Else is there any idea to do the search as well as the download related to the sorted result in same way, without ajax means Kindly suggest please.. ?

23rd August, 2018

AbdulBazith left a reply on Is It Possible To Replace Pagination After Ajax Search In Laravel Like Replacing Body Content In Atable • 1 month ago

@tykus

i tried your solution it worked, but after my pagination change why it is not rendering my header tags etc.

This is my view.blade


<div id="results">
  @include('Location_details.tbody')
</div>

This is my Location_details.tbody


<table id="design" class="table table-bordered"> <caption id="fo"><h2 align="center">LOCATION DETAILS PREVIEW</h2></caption>

    <thead >

            <th >Location</th>
            <th> Area</th>
            <th>Booth</th>
            <th>Action</th>

    </thead>
    <tbody id="results">
        
          @foreach($loc as $locs)
          <tr>
              <td>{{ $locs->ven_loc }}</td>
              <td>{{ $locs->ven_area }}</td>
              <td>{{ $locs->ven_booth }}</td>
  <td>

      {!! Form::open(['route'=>['Location_details.destroy',$locs->id], 'onsubmit' => 'return ConfirmDelete()','method'=>'Delete']) !!}
  <a href="{{ route('Location_details.edit',$locs->id) }}" class="btn btn-info glyphicon glyphicon-edit"></a>

  <button type="submit" class="btn btn-info glyphicon glyphicon-trash">
      </button>
  </td>

  {!! Form::close() !!}
   </tr>
      @endforeach

    </tbody>

</table>

    <div class="text-center page" id="p">

          {!! $loc->Links(); !!}


     </div>

Everything works fine the pagination is changing according to my search.. but when i change the page my headers are not included and my design are not included why??

in my first reload everything works fine. when i search name="Tirunelveli" as said i gave paginate(1) and my search records is 6. so the pagination changed to 6 pages.

Here is the problem. when i click page2 , my design which i wrote as header partial . all that are missing. and one more thing that when i click page2 my pagination changes adn shows 14 pages because i have total of 14 records in my db

What may be the problem??

21st August, 2018

AbdulBazith left a reply on Is It Possible To Replace Pagination After Ajax Search In Laravel Like Replacing Body Content In Atable • 1 month ago

@tykus thankz for the response.

let me try and reply you.!!

AbdulBazith left a reply on Is It Possible To Replace Pagination After Ajax Search In Laravel Like Replacing Body Content In Atable • 1 month ago

@tykus

ss i included. but nothing response the same old pagination is there.

see here..


<table id="design" class="table table-bordered"> <caption id="fo"><h2 align="center">LOCATION DETAILS PREVIEW</h2></caption>

  @include('Location_details.tbody')

</table>



this is my partial Location_details.tbody

 <thead >

            <th >Location</th>
            <th> Area</th>
            <th>Booth</th>
            <th>Action</th>

    </thead>
    <tbody id="results">
        
          @foreach($loc as $locs)
          <tr>
              <td>{{ $locs->ven_loc }}</td>
              <td>{{ $locs->ven_area }}</td>
              <td>{{ $locs->ven_booth }}</td>
  <td>

      {!! Form::open(['route'=>['Location_details.destroy',$locs->id], 'onsubmit' => 'return ConfirmDelete()','method'=>'Delete']) !!}
  <a href="{{ route('Location_details.edit',$locs->id) }}" class="btn btn-info glyphicon glyphicon-edit"></a>

  <button type="submit" class="btn btn-info glyphicon glyphicon-trash">
      </button>
  </td>

  {!! Form::close() !!}
   </tr>
      @endforeach

    </tbody>

    <div class="text-center page" id="p">

          {!! $loc->Links(); !!}
         
     </div>

this is my search just pasted the paginate code


 })->orderBy('created_at','desc')->paginate(1);


             return view('Location_details.tbody', compact('loc'));

see above just i gave paginate(1)

i searched for location= "Tirunelveli" i have 6 search result

so after search my paginate should have 6 pages becoz i given paginate(1). but not changed. the same old pagination only displaying 2 pages.

this is before search is same after search. nothing changed

what should i do?? please help mee

AbdulBazith left a reply on Is It Possible To Replace Pagination After Ajax Search In Laravel Like Replacing Body Content In Atable • 1 month ago

@tykus thankz for your sugestion.

you are ryt. but actually my pagination link is out of the table

<div class="text-center" id="p">

     {!! $loc->Links(); !!}
 
</div>

see i will send my whole view can u suggest which part i can make it as the separate partial


  <thead >

          <th >Location</th>
          <th> Area</th>
          <th>Booth</th>
          <th>Action</th>

  </thead>
  <tbody id="results">
        @include('Location_details.tbody')
  </tbody>
</table>

<div class="text-center page" id="p">

     {!! $loc->Links(); !!}
      
</div>

// these closed div tags are tags which i have started before the thead


  </div>
</div>

</div>



AbdulBazith started a new conversation Is It Possible To Replace Pagination After Ajax Search In Laravel Like Replacing Body Content In Atable • 1 month ago

Guys i am working with a project.

i have view.blade which displays all record in tabular format.

i wrote the portion as separate partial

This is my controller before search

public function index()
    {

        $loc=Location_details::orderBy('created_at','desc')->paginate(10);

        return view('Location_details.view')->withloc($loc);

    }

this is my Location_details.view


  <thead >

          <th >Location</th>
          <th> Area</th>
          <th>Booth</th>
          <th>Action</th>

  </thead>
  <tbody id="results">

        @include('Location_details.tbody')

  </tbody>
</table>

<div class="text-center" id="p">

     {!! $loc->Links(); !!}
 
</div>


This is my Location_details.tbody


   @foreach($loc as $locs)
        <tr>
            <td>{{ $locs->ven_loc }}</td>
            <td>{{ $locs->ven_area }}</td>
            <td>{{ $locs->ven_booth }}</td>
<td>
    {!! Form::open(['route'=>['Location_details.destroy',$locs->id], 'onsubmit' => 'return ConfirmDelete()','method'=>'Delete']) !!}
<a href="{{ route('Location_details.edit',$locs->id) }}" class="btn btn-info glyphicon glyphicon-edit"></a>

<button type="submit" class="btn btn-info glyphicon glyphicon-trash">
    </button>
</td>


this is my ajax request


 $('#location,#area,#booth').on('keyup',function(){

        $.ajax({

        type : 'get',

        url : '{{URL::to('search_location_details')}}',

        data:{
                'location': $('#location').val(),
                'area': $('#area').val(),
                'booth': $('#booth').val()
        },

        success:function(data)
        {
            console.log(data);

              $('#results').html(data);        

        }


This is my search_location_details function in controller


public function search_location_details( Request $request )
    {

            $loc = Location_details::where(function ($query) use ($request)
                {

                    if (!empty($request->location)) {
                    $query->Where('ven_loc', 'LIKE', '%' . $request->location . '%');
                    }

                if (!empty($request->area)) {
                    $query->Where('ven_area', 'LIKE', '%' . $request->area . '%');
                }

                if (!empty($request->booth)) {
                    $query->Where('ven_booth', 'LIKE', '%' . $request->booth . '%');
                }

            })->orderBy('created_at','desc')->get();

             return view('Location_details.tbody', compact('loc'));

    }


here after search the search result is passed to the ajax return and then it is passed to the . so it replaces the tbody portion with the search result.

But the pagination must change according to the search result. but it is not changed.

is it possible to replace the the below pagination also ???


<div class="text-center" id="p">

     {!! $loc->Links(); !!}
 
</div>

when i search using jquery that pagination link remains there and it is not updated as per my returned results. my pagination must update based on the return result this is what i expect.

Kindly some one help please..!!

18th August, 2018

AbdulBazith left a reply on How To Use Form Tag In Ajax Return In Laravel? • 1 month ago

@tykus

One doubt, actually i have replaced the content of tbody after my ajax search so the searched item is displayed as per your suggestion. it worked correctly

then why cant i replace the pagination also


div class="text-center">   

    {!! $loc->Links(); !!}

</div>

see the above section is displayed before search.

After change why cant i replace this pagination s that my search result pagination content only will be displayed am i right??

why i am saying this is because, i no need of moving my search result to page without refresh

instead if i replace the pagination then whenever i search a content pagination will be for that content only that's what i expected

is there any idea??

AbdulBazith left a reply on Ajax With Seach Pagination In Not Working Laravel • 1 month ago

@pardeepkumar @Sergiu17 @zion @crnkovic @jlrdw

One doubt, actually i have replaced the content of tbody after my ajax search so the searched item is displayed .

then why cant i replace the pagination also


div class="text-center">   

    {!! $loc->Links(); !!}

</div>

see the above section is displayed before search.

After change why cant i replace this pagination s that my search result pagination content only will be displayed am i right??

why i am saying this is because, i no need of moving my search result to page without refresh

instead if i replace the pagination then whenever i search a content pagination will be for that content only that's what i expected

is there any idea??

17th August, 2018

AbdulBazith left a reply on Ajax With Seach Pagination In Not Working Laravel • 1 month ago

@pardeepkumar @Sergiu17


$('#location,#area,#booth').on('keyup',function(){ 
        $.ajax({
        type : 'get',

        url : '{{URL::to('search_location_details')}}',

        data:{
                'location': $('#location').val(),
                'area': $('#area').val(),
                'booth': $('#booth').val()
        },

        success:function(data)
        {
            console.log(data);
              $('#results').html(data);

        }

        });
        })


this is what i am passing from my ajax..

can you say where i should add your coding @pardeepkumar

AbdulBazith left a reply on Ajax With Seach Pagination In Not Working Laravel • 1 month ago

@crnkovic ya let me try. tomorrow itself i need to finish it,,

i need to refer tutorial for that and i will try it, thank you for your reply.

If you don't mind can can you kindly share the appropriate video link for my problem in vue.js

AbdulBazith left a reply on Ajax With Seach Pagination In Not Working Laravel • 1 month ago

@crnkovic thankz for your reply.

ya what you said is right. what i expect is after my search only the search records and the pagination for that search records must be displayed.

say for example after search the result contain 8 records means, i give paginate(5) in my search controller. so only two pages with 5 + 3 must be displayed..

but my old pagination before search is displayed.

based on my search my pagination should also change..

thats what i expect..

AbdulBazith left a reply on Ajax With Seach Pagination In Not Working Laravel • 1 month ago

@Sergiu17 thankz for your reply, let me try and reply,,

AbdulBazith left a reply on Ajax With Seach Pagination In Not Working Laravel • 1 month ago

@zion

most of the times i refer google. but iam new to laravel so sometimes i cant understand. in this threads some one will answer with explanation. that would help me improve my project as well as knowledge.

actually i am in dead end of my project that's why asked this question.

see my thread past 10 threads speaks about this pagination only.

pagination problem with this ajax is some what tedious task for me

kindly dont mistake me..

16th August, 2018

AbdulBazith started a new conversation Ajax With Seach Pagination In Not Working Laravel • 1 month ago

Guys i am working with a project

i am using search inajax

This is my controller before search

 public function index()
    {

        $loc=Location_details::orderBy('created_at','desc')->paginate(10);
        return view('Location_details.view')->withloc($loc);

    }

This is my partials 'tbody'


        @foreach($loc as $locs)
            <tr>
                <td>{{ $locs->ven_loc }}</td>
                <td>{{ $locs->ven_area }}</td>
                <td>{{ $locs->ven_booth }}</td>
<td>

        {!! Form::open(['route'=>['Location_details.destroy',$locs->id], 'onsubmit' => 'return ConfirmDelete()','method'=>'Delete']) !!}
    <a href="{{ route('Location_details.edit',$locs->id) }}" class="btn btn-info glyphicon glyphicon-edit"></a>

    <button type="submit" class="btn btn-info glyphicon glyphicon-trash">
        </button>
</td>

{!! Form::close() !!}
     </tr>
        @endforeach

This is my view


 <tbody id="results">
        @include('Location_details.tbody')
    </tbody>

  </table>

        <div class="text-center">

            {!! $loc->Links(); !!}
        </div>

This is my search_Location controller

public function search_location_details( Request $request )
    {


            $loc = Location_details::where(function ($query) use ($request)
                {

                    if (!empty($request->location)) {
                    $query->Where('ven_loc', 'LIKE', '%' . $request->location . '%');
                    }

                if (!empty($request->area)) {
                    $query->Where('ven_area', 'LIKE', '%' . $request->area . '%');
                }

                if (!empty($request->booth)) {
                    $query->Where('ven_booth', 'LIKE', '%' . $request->booth . '%');
                }

            })->orderBy('created_at','desc')->paginate(10);

             return view('Location_details.tbody', compact('loc'));     

         
    }

This is my ajax

success:function(data)
        {
            console.log(data);

              $('#results').html(data);
             

        },

everything works fine. but pagination is the only problem

see i have given pagination in the view file..

Kindly help me this

it sorts correctly, but when i click page 2 then the page is reloaded so once again i need to search..

When i click page 2 page is refereshed how to solve this??

AbdulBazith left a reply on Problem In Pagination After Ajax Return In Laravel • 1 month ago

@jlrdw @newbie360 @pardeepkumar

thank you guys

Let me try..

Kindly if possible refer my thread and give a solution for that

How to use form tag in ajax return in laravel?

AbdulBazith left a reply on How To Use Form Tag In Ajax Return In Laravel? • 1 month ago

@tykus

your solution 'partial' worked thank youu soo much

But i have given pagination in my search also thats not working why?

This is my controller before search


 public function index()
    {

        $loc=Location_details::orderBy('created_at','desc')->paginate(10);
        return view('Location_details.view')->withloc($loc);

    }

This is my partials 'tbody'


        @foreach($loc as $locs)
            <tr>
                <td>{{ $locs->ven_loc }}</td>
                <td>{{ $locs->ven_area }}</td>
                <td>{{ $locs->ven_booth }}</td>
<td>

        {!! Form::open(['route'=>['Location_details.destroy',$locs->id], 'onsubmit' => 'return ConfirmDelete()','method'=>'Delete']) !!}
    <a href="{{ route('Location_details.edit',$locs->id) }}" class="btn btn-info glyphicon glyphicon-edit"></a>

    <button type="submit" class="btn btn-info glyphicon glyphicon-trash">
        </button>
</td>

{!! Form::close() !!}
     </tr>
        @endforeach



This is my view

 </table>

        <div class="text-center">

            {!! $loc->Links(); !!}
        </div>

This is my search_Location controller


public function search_location_details( Request $request )
    {


            $loc = Location_details::where(function ($query) use ($request)
                {

                    if (!empty($request->location)) {
                    $query->Where('ven_loc', 'LIKE', '%' . $request->location . '%');
                    }

                if (!empty($request->area)) {
                    $query->Where('ven_area', 'LIKE', '%' . $request->area . '%');
                }

                if (!empty($request->booth)) {
                    $query->Where('ven_booth', 'LIKE', '%' . $request->booth . '%');
                }

            })->orderBy('created_at','desc')->paginate(10);

             return view('Location_details.tbody', compact('loc'));     

         
    }


This is my ajax


success:function(data)
        {
            console.log(data);

              $('#results').html(data);
             

        },


see i have given pagination in the view file..

Kindly help me this

it sorts correctly, but when i click page 2 then the page is reloaded so once again i need to search..

15th August, 2018

AbdulBazith left a reply on How To Use Form Tag In Ajax Return In Laravel? • 2 months ago

@tykus sorry somewhat busy with other work.

just now seeing your answer.

but Is it possible to redirect to index method() in controller by ajax request from view.blade

i have a made a new thread based on this. if possible kindly answer that. because if that worked, i can easily complete my project.

i have explained it detail in that thread

Kindly refer that:

Is it possible to redirect to index method() in controller by ajax request from view.blade in laravel

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.