Posts

sms intregation by laravel

  protected function createCustomer(Request $request)     {         $frontDesign=Websitefrontdesign::first();   if($request->password != $request->re_password) { return redirect()->route('register')->with('error_message', 'Password Not Matched,Please Try Again.'); } if($request->customer_email != null) { $customer_email=$request->customer_email;     $checkIfCutomerEmailExist=Customer::where('customer_email',$request->customer_email)->first();     if($checkIfCutomerEmailExist != null)     {     return redirect()->route('register')->with('error_message', 'Email Already Exist Please,Give Differnt Email Address.');     } } else { $customer_email=""; } $checkIfCutomerUserNameExist=Customer::where('customer_username',$request->customer_username)->first();       if($c...

get data by codeiginter

      $this -> data [ 'department' ] = $this -> db -> query ( " SELECT * FROM blog " ) -> result ();

date wise search codeigniter

  if ( ! empty ( $startdate ))         {             $this -> db -> where ( 'DATE(pickupman_received_date) >=' , $startdate );             }         if ( ! empty ( $enddate ))         {                   $this -> db -> where ( 'DATE(pickupman_received_date) <=' , $enddate );               }

laravel - order query

    $data = Order :: query ()             -> where ( 'employeeid' , 'LIKE' , "%{ $employeeid }%" )               -> orderBy ( 'id' , 'DESC' )             -> paginate ( 25 );

laravel where and orwhere query with pagination

    public function SupplierProductReturnSearch ( Request $request ){         // Get the search value from the request         $search = $request -> input ( 'search' );                   // Search in the title and body columns from the posts table         $listings = MainProduct :: query ()             -> where ( 'name' , 'LIKE' , "%{ $search }%" )                       -> orWhere ( 'product_id' , 'LIKE' , "%{ $search }%" )                       -> paginate ( 25 );             // Return the search view with the resluts compacted         return view ( 'front.manager.return-supplier-product' , compact ( 'listings' ));     }

other table connect

        // Load database   $db2 = $this -> load -> database ( 'database2' , TRUE );   // Select records from 2nd database   $db2 -> select ( '*' );   $db2 -> where ( 'id' , $business_id ); $query = $db2 -> get ( 'cld_businesses' );   $bussinessData = $query -> first_row ();

order by and order type

   $this->data['rows'] = $this->batch_model->get_rows(array("table" => "result_control", "limit" => $limit, "offset" => $offset,"order_by"=>"id", "order_type"=>"desc"), array());