bipin

Experience

4,610

3 Best Reply Awards

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

18th August, 2017

bipin left a reply on Why Resource Not Getting Loaded • 1 day ago

@martinbean other view working properly

bipin started a new conversation Why Resource Not Getting Loaded • 1 day ago

i have css file which is located at resource/assets folder when i m loading view its throw error like this

    GET http://localhost/mwayhire_de/public/resources/assets/vendors/font-awesome/css/font-awesome.min.css 

my file is at same location where it throw error moreover other view are working properly but this throw error

10th August, 2017

bipin started a new conversation FirstorCreate Function Taking Only 2 Parameter • 1 week ago

i m trying to save data to user table using first or create

           $user=User::firstorCreate(
      ['user_type'=>2],
      ['fname'=>$socialuser1 ->user['name']['givenName']],
      ['lname'=>$socialuser1 ->user['name']['familyName']],
      ['userid'=>$socialuser1 ->getEmail()],
      ['email'=>$socialuser1 ->getEmail()],
      ['password'=>Hash::make(str_random(8))]
        );

this data i m try to save why i m getting this error

     SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "lname" violates 
    not-null constraint
    DETAIL: Failing row contains (3, 2, rocky, null, null, null, null, f, null, 2017-08-10 12:20:56, 
   2017-08-10 12:20:56). (SQL: insert into "users" ("user_type", "fname", "updated_at", 
    "created_at") values (2, rocky, 2017-08-10 12:20:56, 2017-08-10 12:20:56) returning "id")

every field is my table is not null field but this issue should not be arise because i m passing value ever field i have value in every field i had checked using dd

9th August, 2017

bipin left a reply on Cant Foreach Array In Blade • 1 week ago

chu

bipin started a new conversation Route Not Define In Laravel • 1 week ago

i m using route function to send my data but it not working here is my blade

                 <a href="{{route('hrlogin.google',['google'])}}" class="btn btn-lg btn-block 
                   omb_btn-google">

here is my route

                      Route::get('auth/{provider}', 'Auth\[email protected]')->name('hrlogin.google');

but it throw error route not define i dont know why this happen is this bug

8th August, 2017

bipin left a reply on Custom Validation • 1 week ago

just use default validation it will automatically do what you want

bipin left a reply on How Join Two Queries And Do Pagination • 1 week ago

go like this

 $resultall = $Result1 . ' ' . $Result2;

30th June, 2017

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

@nanadjei2 this error occur because you are trying to store invalide date formate in your table

bipin left a reply on How Do I Check If There Is Empty Field In My Datatable? • 1 month ago

i m not getting what you are try to do you can explain it more clearly so i can help..

bipin left a reply on How Do I Check If There Is Empty Field In My Datatable? • 1 month ago

@dreamxyz did you fetch table in controller

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

@nanadjei2 first check did you getting any value in each foreach loop using dd and let me know i think this error cause beacuse of while l

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

@nanadjei2 this error because of row

use this thing in view

           <input type="text"   name="description[]" id="des">
             <input type="text"   name="selling[]" id="sell">
                <input type="text"   name="quantity[]" id="quan">

and apply your own jquery in your controller your controller

       foreach($requst->get('des') as $values){
           $f[]   = $values;
          }
         foreach($requst->get('sell') as $values){
           $k[]   = $values1;
          }
          foreach($requst->get('quan') as $values){
           $t[]   = $values2;
          }
        $j = 0;
         while($j < count($request->get('des'))) {

           $Val            = $f[$j];
            $new        = $k[$j];
            $new1  =$t[$j];
             DB::insert('insert into 'tablename' 
      (coulnmname1,coulnmname2,coulnmname3) values(?,?,?)',
    [$Val,$new,$new1);

hope this will solve your issue

28th June, 2017

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

@nanadjei2 error which you getting is because of your controller since your passing array of data and try to save it directly into database just use above code to save it on database it will work perfectly

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

@nanadjei2 if you still need i can create video for data on you tuble

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

@nanadjei2 , yes you can create dynamic form and save it into mysql . 1.you need to create 2 (menu and submenu) table 2.just save all dynamic form data in one table(eg supoose it name is menu) in row wise manner 3.pass its id to 2 table(eg supoose it name is submenu)

27th June, 2017

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

use mongo db, you will find example on google if you are using other database then create new table where you store all your row wise increase data(dynamic form data) and pass there id in other table(2 one)

bipin left a reply on Laravel 5.4 Dynamic Form Save Data To Database • 1 month ago

this error occur because you don't have dynamic column(increasing column ,mean you have to create column every time manually in Db) in you DB so use big data for this kind of thing but still if you need to perform these thing in other data for that you need to store data in row wise rather than column wise hope this help

bipin left a reply on How To Take Matching Data For Searching Using Laravel And Mongo? • 1 month ago

1.join both table and then perform search 2.suppose if your are performing search on table(booking) then you will also get userid. stored it in any other variable and again perform query using where condition on user table

bipin started a new conversation How To Share Auth View As Well As Sidebar Data With All View • 1 month ago

hi guys so far i had create a sidebar menu whose value (name) getting from DB and its working properly but when i try to verify whether a user is superadmin or user then its should share view $sa(superadmin) otherwise it should share view $ca (user)how i can achieve these thing need suggestion

AppServiceProvider view

              public function boot()
     {
     //dd(Auth::user());
    if(DB::table('user')->where('role','superadmin')->get()){
         $sa=DB::table('master')>join('page','master.id'=page.id)
      ->get();
   View::share('sa', $sa);
    }

     if(DB::table('user')->where('role','user')->get()){
         $ca=DB::table('master')>join('page','master.id'=page.id)
     where(master.role_id=2) ->get();
    View::share('ca', $ca);
  }
   }

auth user return null is also try view composer nothing worked so far

26th June, 2017

bipin started a new conversation How To Make Dynamic Menu • 1 month ago

hi guys so far i had create a sidebar menu whose value (name) getting from DB and its working properly but when i try to verify whether a user is superadmin or user then its should share view $sa(superadmin) otherwise it should share view $ca (user)how i can achieve these thing need suggestion AppServiceProvider view

      public function boot()
   {

    if(DB::table('user')->where('role','superadmin')->get()){
             $sa=DB::table('master')>join('page','master.id'=page.id)
     ->get();
  View::share('sa', $sa);
  }

   if(DB::table('user')->where('role','user')->get()){
             $ca=DB::table('master')>join('page','master.id'=page.id)
    where(master.role_id=2) ->get();
  View::share('ca', $ca);
  }
    }

22nd June, 2017

bipin started a new conversation How To Fetch Relation Array Or Verifiy • 1 month ago

here guys i stuck what condition should i apply so need your help i had developed relationship between menu & submenu model where menu has many submenu its work fine here is my data stucture

       1.product---(menu table)
              1.addnew        --(submenu)
              2.listproduct   --(submenu)
        2.setting        ---(menu table)
              1.addcate         --(submenu)
              2.addsubcat   --(submenu)
       3.people

this is what i m getting from relation query i.e from model it work perfectly but my issue is that i want to put condition in mmy view if menu table does not have submenu then its should print this

            @if (empty($d->subMenu)
                   <li class="mm_welcome"><a href="{{url($d->menuurl)}}"><i class="fa fa-
             dashboard"></i> <span>{{$d->name}}</span></a></li>
             
                  @endif   

and if it have both menu and submenu table then it should go in this condition need your help

         @foreach($cat as $d)
         

             <li class="mm_welcome">
                <a href="#">
                    <i class="fa fa-barcode"></i>
                    <span>{{$d->name}}</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                 @foreach($d->subMenu as $s)
                    <li id="products_index"><a href="{{url($s->suburl)}}"><i class="fa fa-circle-o">
                   </i> {{$s->name}}</a></li> 
                   @endforeach 
                </ul>
            </li>
            
        @endforeach 

9th June, 2017

bipin left a reply on Relationships Not Working • 2 months ago

i think you need these thing just follow these thing carefully

https://laracasts.com/discuss/channels/laravel/invalid-argument-supplied-for-foreach-12

https://laracasts.com/discuss/channels/laravel/how-to-create-model-for-category-subcategory-and-product just go through carefully you will find your answer hope this help

bipin left a reply on HOW I CAN FETCH ORIGINAL ATTRIBUTE VALUE • 2 months ago

@Snapey #original: array:10 [▶] contain product id which i want so that i can update my product(table) value

bipin left a reply on HOW I CAN FETCH ORIGINAL ATTRIBUTE VALUE • 2 months ago

@tykus actually all value are stored in my cart variable, i had also try cart variable to fetch original array just for knowledge.. $cart->getoriginal(); but get nothing

bipin left a reply on HOW I CAN FETCH ORIGINAL ATTRIBUTE VALUE • 2 months ago

@Snapey its actually contain id of some product and other value so just want to know is there any method to fetch these value

bipin left a reply on HOW I CAN FETCH ORIGINAL ATTRIBUTE VALUE • 2 months ago

@tykus its throw Undefined variable: items can you brief about getoriginal() attribute

8th June, 2017

bipin started a new conversation HOW I CAN FETCH ORIGINAL ATTRIBUTE VALUE • 2 months ago

hello guys i m too curious to know weather is there any method to find value of these thing

        Cart {#281 ▼
    +items: array:2 [▼
         1 => array:3 [▼
              "qty" => 2
              "price" => 20000
              "item" => Sellerproduct {#278 ▼
              +table: "sellerproduct"
               #connection: "pgsql"
               #primaryKey: "id"
               #keyType: "int"
              +incrementing: true
              #with: []
              #perPage: 15
               +exists: true
               +wasRecentlyCreated: false
               #attributes: array:10 [▶]
                #original: array:10 [▶]
                #casts: []
                #dates: []
                #dateFormat: null
                #appends: []
                #events: []
                #observables: []
                #relations: []
                #touches: []
               +timestamps: true
              #hidden: []
               #visible: []
              #fillable: []
            #guarded: array:1 [▶]
              }
               ]
             3 => array:3 [▶]
             ]
             +totalQty: 4
            +totalPrice: 20540
             }

is there any method to know what #original: array:10 [▶] contain (mean what it have value) please guys help if search a lot on internet but did not find any solution

30th May, 2017

bipin left a reply on Seller Product Quantity Value Decrements Not Work • 2 months ago

fetch data from database and store it into any variable for eg:-$s and use this also

       $q=$cart->totalquantity 
         $r=$s-$q
      DB::table('tablename')
    ->where('id',$id) 
    
    ->update(array('quantity' => $r)); 
    
    

bipin left a reply on Check User Is Verified After Login • 2 months ago

@moto yes it possible, but it increase you route which will reduce performance if you still require then create new controller where you can place all your common logic (means check user) and from there redirect it to other controller using route

bipin left a reply on Check User Is Verified After Login • 2 months ago

@moto i think you modify in vendor folder

bipin left a reply on Multi Step Authentication • 2 months ago

create controller with same function method which are using in core.... in this way you can override method this means that it first check you controller you defined method.. do not override you core code its bad practise

26th May, 2017

bipin left a reply on Values Stored In Session Are Not Displaying In Array • 2 months ago

try to use this

   $request->session()->all('');

24th May, 2017

bipin left a reply on Button Changed Script • 2 months ago

yes he need to change button from add to cart to go to cart after click ?

23rd May, 2017

bipin left a reply on Session Table Columns • 2 months ago

use this hope it will help $value = $request->session()->get('key');

bipin left a reply on How To Auth With Laravel 5.4 • 2 months ago

this error arise because of predefine code in vendor folder which version you are using of laravel

bipin left a reply on How To Send Array To Server From Input Text • 2 months ago

just save array of request data directly into database for eg

DB::insert('insert into ''('where you want to enter) values(?)',[request->input::all()]);

19th May, 2017

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

@Snapey name='result[i]name' ,array has only single value here is my dd value

   array:1 [▼
          "i" => "6"
       ]

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

@Snapey here i m script form $(document).ready(function(){ var inp = $('#box');

    var i = $('input').size() + 1;
      @foreach($result as $s)
                @if($s->fieldtype=='text')
    $('<div id="box' + i +'"><input type="text" id="name" class="name" 
     name="name[][name]" /></div>').appendTo($('#box form'));
     $('<div id="box' + i +'"><input type="hidden"  name="name[][id]"  
      value="{{$s->id}}"></div>').appendTo($('#box form'));
   
              @elseif($s->fieldtype=='textarea')

        $('<div id="box' + i +'"><input type="textarea" id="name" class="name" 
     name="name[]" /></div>').appendTo($('#box form'));

     @endif
      i++;
                  @endforeach     
     });
     </script>

i m getting value( like text) from database('detailtbl') then script append input type text & it appear at client side(viewpage) after this client enter some value in input type and save it

what i need is i m trying to save id of detail table and input value of client at new database (mastertbl)

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

@Snapey i m trying to save array of data into database column but i don't know how to code in controller

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

its not work you code is wrong it only fetch name not id from an array

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

@AhimbisibweRoland its not working its throw error

         Array to string conversion

i want to insert these array value in increasing order

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

yes at start i had post a result

bipin left a reply on How I Can Store These Array Value In Same Row • 3 months ago

@topvillas i have id and column but don't know how to code in controller little with confuse here is my controller

   public function insert1(Request $request)
  {
   $dd($request->get('name'));


 foreach($request->get('name') as $name) {
  DB::insert('insert into mastertabledetail (name,id) values(?,?)',[$name]);

 
 }

}

18th May, 2017

bipin started a new conversation How I Can Store These Array Value In Same Row • 3 months ago

here is what i get from dd array:6 [▼ 0 => array:1 [▼ "name" => "werf" ] 1 => array:1 [▼ "id" => "2" ] 2 => array:1 [▼ "name" => "df" ] 3 => array:1 [▼ "id" => "3" ] 4 => array:1 [▼ "name" => "ngf" ] 5 => array:1 [▼ "id" => "4" ] ] how i can store this value in database for eg:- i want to store name in name column and id in id column of my table any suggestion???

17th May, 2017

bipin left a reply on Populate 3 Different Models From One Big Array With Relations • 3 months ago

@R3l4x3 use foreachloop in you controller

16th May, 2017

bipin left a reply on $error Disapear After One Second When Validator Fail • 3 months ago

or try this

  return redirect()->back()->withInput($request 
                >only('email','phone','anything which you are requesting'));

bipin left a reply on $error Disapear After One Second When Validator Fail • 3 months ago

put required in html it will prevent clearing of hole thing for eg:- Username:

bipin left a reply on $error Disapear After One Second When Validator Fail • 3 months ago

@dexluce what problem exaclty you have ? are you trying to see error message for a long time ?

Edit Your Profile
Update

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