Webiondev123

Experience

6,560

0 Best Reply Awards

  • Member Since 6 Months Ago
  • 17 Lessons Completed
  • 0 Favorites

16th May, 2018

Webiondev123 started a new conversation Login Test Failed • 6 days ago

 public function testLoginPost(){
    Session::start();
    $response = $this->call('POST', 'login', [
        'email' => '[email protected]',
        'password' => '123456',
        '_token' => csrf_token()
    ]);
    $this->assertEquals(200, $response->getStatusCode());
    $this->assertEquals('auth.login', $response->original->name());
}

output

 public function testLoginPost(){
    Session::start();
    $response = $this->call('POST', 'login', [
        'email' => '[email protected]',
        'password' => '123456',
        '_token' => csrf_token()
    ]);
    $this->assertEquals(200, $response->getStatusCode());
    $this->assertEquals('auth.login', $response->original->name());
}

15th May, 2018

Webiondev123 left a reply on Phpunit Testing Cannot Find File And Cannot Test Globally • 1 week ago

From windows command line it givs

c:\wamp64\www\fundtheneedy>vendor/bin/phpunit
'vendor' is not recognized as an internal or external command,
operable program or batch file.

Also where do I create .bashrc file? in my root laravel app? That makes it .bashrc.sh which I tried but still not working

14th May, 2018

Webiondev123 started a new conversation Phpunit Testing Cannot Find File And Cannot Test Globally • 1 week ago

I am unable to run phpunit test from root folder but when I change to vender/bin I can run phpunit but cannot test. It says cannot open file

5th May, 2018

Webiondev123 started a new conversation Where Is The Parameter In This Function? • 2 weeks ago

Shouldnt there be a parameter passed here

position=value;
navigator.geolocation.getCurrentPosition(showPosition(position));

What kind of programming is this?

<script>
var x = document.getElementById("demo");
function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else {
        x.innerHTML = "Geolocation is not supported by this browser.";
    }
}
function showPosition(position) {
    x.innerHTML = "Latitude: " + position.coords.latitude + 
    "<br>Longitude: " + position.coords.longitude; 
}
</script>

6th April, 2018

Webiondev123 started a new conversation How Can I Change Login Table For Admin? • 1 month ago

Now users are logging in using the User model which referes user table. But I want admin to use anther table to login..how can this be achieved?

Thanks

4th April, 2018

Webiondev123 left a reply on How To Rewriterule For Localhost? • 1 month ago

Still not working

Heres my full .htaccess

AddType application/x-httpd-php .xml
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/webmin
RewriteRule (.*) https://dev.boocak.com%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^/webmin
RewriteRule (.*) http://dev.boocak.com%{REQUEST_URI} [L,R=301]

RewriteRule ^webmin/$ webmin/index.php [L]

RewriteRule ^captcha/([^/]*)/([^/]*)/([^/]*)/$ CaptchaSecurityImages.php?width=&height=&characters= [L]
RewriteRule ^ajax/([^/]*)/$ ajax.php?action= [L]

RewriteRule ^listing-info-([^/]*)/([^/]*)/([^/]*)/$ product_info.php?name=&uid=&msg= [L]
RewriteRule ^listing-info-([^/]*)/([^/]*)/$ product_info.php?name=&uid= [L]
RewriteRule ^listing/([^/]*)/$ products.php?s= [L]
RewriteRule ^listing/$ products.php [L]

RewriteRule ^checkout/$ checkout.php [L]
RewriteRule ^checkout/step2/([^/]*)/$ checkout-step2.php?msg= [L]
RewriteRule ^checkout/step2/$ checkout-step2.php [L]
RewriteRule ^checkout/step3/$ checkout-step3.php [L]
RewriteRule ^checkout/process/$ checkout-process.php [L]
RewriteRule ^senangpay/$ senangpay-process.php [L]
RewriteRule ^thank-you/([^/]*)/$ checkout-complete.php?ON= [L]

RewriteRule ^login/([^/]*)/$ login.php?msg= [L]
RewriteRule ^login/$ login.php [L]
RewriteRule ^booking-details/$ booking-details.php [L]
RewriteRule ^booking-download/$ booking-download.php [L]

RewriteRule ^request-booking/([^/]*)/$ request-booking.php?msg= [L]
RewriteRule ^request-booking/$ request-booking.php [L]

RewriteRule ^([^/]*)/([^/]*)/$ content.php?pagename=&msg= [L]
RewriteRule ^([^/]*)/$ content.php?pagename= [L]

Addtype plain/text .xml

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName JustSimple

Webiondev123 started a new conversation How To Rewriterule For Localhost? • 1 month ago

How can I rewriterule for localhost once I downloaded files from server?

this is what I need changed to localhost. This is now in server form

ewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/webmin
RewriteRule (.*) https://dev.boocak.com%{REQUEST_URI} [L,R=301]

I want localhost to land on index.php

2nd April, 2018

Webiondev123 started a new conversation How Can You Test PHP Payment System ? • 1 month ago

How can I test the PHP payment system which once card details are entered directs to bank payment gateway?

31st March, 2018

Webiondev123 started a new conversation Unable To Deploy To Forge With Multiple Databases • 1 month ago

Illuminate\Database\QueryException  : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'password_resets' already exists (SQL: create table `password_resets` (`email` varchar(255) not null, `token` varchar(255) not null, `deleted_at` timestamp null, `created_at` timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci)

  at /home/forge/admin.fundtheneedy.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php: 664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668|

  Exception trace:

  1   PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'password_resets' already exists")
      /home/forge/admin.fundtheneedy.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php : 458

  2   PDOStatement::execute()
      /home/forge/admin.fundtheneedy.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php : 458

  Please use the argument -v to see more details.


Got two databases in database.php

27th March, 2018

Webiondev123 started a new conversation Add Multiple Columns In Geochart Lavachart • 1 month ago

 $data= Stat::select("country as 0","category as 1", "count as 2")->get()->toArray();

           


        $need_stat->addStringColumn('country')
          ->addStringColumn('category')
          ->addNumberColumn('count');
      

        $need_stat->addRows($data);
           
         $stat->GeoChart('need_stat', $need_stat);

But it is not adding as I expect.

Country should be country

Category has following:

community charity science .....

Count has count for each of those categories

I am unable to display like this

UK community: 1 charity: 2

on the geochart

Its just showing

community 1

Webiondev123 left a reply on SQLSTATE[42S02] • 1 month ago

Create the table cruds and then create the model and fill the necessary columns

26th March, 2018

Webiondev123 left a reply on Help Me Pass The Data To Lavachart Geochart • 1 month ago

Ok I just need to add count

User::join('need', 'need.user_id', '=', 'users.id')->select('users.country as 0', 'need.category as 1')->get()->toArray();

Webiondev123 left a reply on Help Me Pass The Data To Lavachart Geochart • 1 month ago

These what I tried

https://ibb.co/ipdGkS

Webiondev123 left a reply on Help Me Pass The Data To Lavachart Geochart • 1 month ago

 $data= DB::table('users')->join('need', 'users.id', '=', 'need.user_id')->select('users.country',DB::raw(count('need.category') ))->get()->toArray();  


Still error

Type error: Argument 1 passed to Khill\Lavacharts\DataTables\DataTable::addRow() must be of the type array or null, object given,

Webiondev123 started a new conversation Help Me Pass The Data To Lavachart Geochart • 1 month ago

I need something like this

 $lava = new Lavacharts; 


$popularity = $lava->DataTable();
$data = CountryUser::select("name as 0","total_users as 1")->get()->toArray();


$popularity->addStringColumn('Country')
           ->addNumberColumn('Popularity')
           ->addRows($data);


$lava->GeoChart('Popularity', $popularity);

I am trying this

 $stat = new Lavacharts;
       $need_stat=$stat->DataTable();


       $data= DB::select('SELECT user_id,category as 0, count(*) as Count as 1 FROM need group by category having user_id in(select id from users)');

       $need_stat->addStringColumn('Category')
           ->addNumberColumn('Count')
           ->addRows($data);


        $stat->GeoChart('Need', $need_stat);

What I need to display is this

Country: value
category1: count1
category2: count2
.....

Please help me solve this

Thanks

25th March, 2018

Webiondev123 left a reply on Raw Query Giving Error When Passed To View • 1 month ago

just this

{{$data}}

24th March, 2018

Webiondev123 started a new conversation Raw Query Giving Error When Passed To View • 1 month ago

htmlspecialchars() expects parameter 1 to be string, array given

My controller

public function stat(){



       $data= DB::select('SELECT user_id,category, count(*) FROM need group by category having user_id in(select id from users)');


      
        return view('stat')->with('data', $data);
        }

Webiondev123 started a new conversation Why Can't I Connect And R/w From My Other Database? • 1 month ago

I am connecting through database admin_fn but I cannot read from other database fn


class User extends Authenticatable //admn user table (mysql2)
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    use SoftDeletes;

    protected $dates = ['deleted_at'];
    
    protected $fillable = [
        'name', 'email', 'password','city', 'country', 'type','occupation','deleted_at', 'file' 
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

        'mysql' => [
              'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'fn'),
            'username' => env('DB_USERNAME', 'user'),
            'password' => env('DB_PASSWORD', 'pass'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
],

       'mysql2' => [
              'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'admin_fn'),
            'username' => env('DB_USERNAME', 'user'),
            'password' => env('DB_PASSWORD', 'pass'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
],

DB_CONNECTION=mysql2
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=admin_fn
DB_USERNAME=root
DB_PASSWORD=root


DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=fn
DB_USERNAME=root
DB_PASSWORD=root


    public function listuser()
    {

        $data=DB::Connection('mysql2')->table('users')->select('id', 'name', 'email', 'occupation', 'city', 'country', 'type', 'file')->paginate(10); 
        return view('userslist')->with('data', $data);
    }

It is returning me only from mysql users which is database fn

22nd March, 2018

Webiondev123 started a new conversation How Do You Make Search Engine Hit Your Laravel Site? • 2 months ago

Hi

I deployed my site and also added google analytics in header....What else shuld I do for search engine finding my site?

Thanks

20th March, 2018

Webiondev123 left a reply on Why I Am Sending Email To Myself ? • 2 months ago

Thanks for the replies...What I mean is how can I reply to the people's email when I do not see their email in from field in inbox? Even though email is coming to me but I am seeing in my email that from is same as to ..Here is my inbox


from:   My Name <[email protected]>
to: [email protected]
date:   Wed, Mar 21, 2018 at 8:07 AM
subject:    Cannot send message
mailed-by: mydomain.com

Webiondev123 started a new conversation Why I Am Sending Email To Myself ? • 2 months ago

I want a contact form for users to send me email


        Mail::send('email', ['title' => 'Complaint', 'content' => $request->complaint], function ($message)  use ($request)
        {

            $message->from($request->email, $request->name);
            $message->subject($request->subject);
            $message->to('[email protected]', 'myname');

        });

in mail.php

  'from' => [
        'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
        'name' => env('MAIL_FROM_NAME', 'mydomain'),
    ],

Even when I comment out the from in mail.php still it is only sending to myself.

18th March, 2018

Webiondev123 left a reply on Type Error: Argument 2 Passed To Illuminate\Mail\Mailer::send() Must Be Of The Type Array, Object Given, • 2 months ago

@ejdelmonico what view I use? Is there a readymade view to send to email?

Webiondev123 left a reply on What Host Address You Put In Linode Forge Env File? • 2 months ago

@ejdelmonico how do you integrate two databases to connect to in .env file?

Webiondev123 started a new conversation What Host Address You Put In Linode Forge Env File? • 2 months ago

I am seeing once deployed localhost address. Doyou put local host address as DB host in forge env file or the domain address? if domain address what port?

Webiondev123 started a new conversation Type Error: Argument 2 Passed To Illuminate\Mail\Mailer::send() Must Be Of The Type Array, Object Given, • 2 months ago

I need help understanding what parameter exactly should I put in send? I know array but array of validation?

  protected function create(array $data)
    {
        
           
          
      
        $newUser= User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'city'=> $data['city'],
            'country'=>$data['country'],
            'type'=>$data['type'],
            'occupation'=>$data['occupation'],
          
            'file'=>$file,
            
        ]);

        $message="Welcome to mysite!";
           Mail::send('newUser', function($message){
        $message->from('[email protected]');
        $message->subject('welcome');
        $message->to($newUser['email']);
    });


           return $newUser;
    }

13th March, 2018

Webiondev123 left a reply on Email Not Going • 2 months ago

@Sergiu17 thanks I used notification to solve this

Webiondev123 left a reply on Email Not Going • 2 months ago

@Sergiu17 Type error: Argument 2 passed to Illuminate\Mail\Mailer::send() must be of the type array, object given, called in

Webiondev123 started a new conversation Email Not Going • 2 months ago

 $email=User::find($id);
       Mail::send(['text'=>'mail'], $request->message, function($message) {
                 $message->to($email->email, name')->subject
                    ('New Message!');
                 $message->from('[email protected]','mydomain');
      });

                

What am I doing wrong?

Webiondev123 started a new conversation Someone Pls Guide Me In This Simple Subdomain Issue • 2 months ago

I have my domain IP in forge and my virtual machine is in linode. Where exactly I create subdomain IP address?

My domain name is from godaddy

Thanks

Webiondev123 left a reply on How To Add A Subdomain? • 2 months ago

@burlresearch I using Linode and Forge..where do I set up ?

12th March, 2018

Webiondev123 started a new conversation How To Add A Subdomain? • 2 months ago

Say I have a domain xyz.com now I want to add admin.xyz.com

How can I do this if I get my domain name from godaddy? In godaddy the subdomain adding required forwarding..Why do I need to forward my xyz site? I want an admin site

Thanks

Webiondev123 left a reply on Gmail Reset Password Only Worked Once Then This Error... • 2 months ago

I somehow fixed it by playing around.. But dont know which step did the trick.. Thanks

11th March, 2018

Webiondev123 started a new conversation Gmail Reset Password Only Worked Once Then This Error... • 2 months ago

Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required. Learn more at 530 5.5.1 https://support.google.com/mail/?p=WantAuthError o24sm4620846wmi.29 - gsmtp "

How can I fix it?

10th March, 2018

Webiondev123 started a new conversation Laravel Scout Every Time I Have To Run Php Artisan Scout:import "App\tablename • 2 months ago

Why isnt my scout auto syncing with my search and tables? Every time i modify my table the scout does not know it. I have to run that command to sync.

I set the queue to true in scout.php

9th March, 2018

Webiondev123 started a new conversation Mailgun Password Reset Error Expected Response Code 250 But Got Code "554", With Message "554 Free Accounts Are For Test Purposes Only. Please Upgrade Or Add The Address To Authorized Recipients In Account Settings. " • 2 months ago

Expected response code 250 but got code "554", with message "554 Free accounts are for test purposes only. Please upgrade or add the address to authorized recipients in Account Settings. "

I have my domain set up.. I want the email to be [email protected] Here is my setup in laravel

MAIL_DRIVER=smtp MAIL_HOST=smtp.mailgun.org MAIL_PORT=587 [email protected] MAIL_PASSWORD=mailgun given password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS: [email protected] MAIL_FROM_NAME: mydomain

I have put the secret key in services.php

'mailgun' => [ 'domain' => env('mg.mydomain.com'), 'secret' => env('key'), ],

Can you help me make it work before I can buy..If I am unable to make it work, I wont be buying any plans.

Thanks

Webiondev123 left a reply on We Have E-mailed Your Password Reset Link! But No Email Coming In My Email ? • 2 months ago

@bashy unfortunately Fastmail wasnt able to solve this issue and closed my account lol

Webiondev123 left a reply on We Have E-mailed Your Password Reset Link! But No Email Coming In My Email ? • 2 months ago

I am sending to my yahoo email ..so the user is registered and when user requests reset the fasmail send the link to user email which is different from fastmail email

@bashy

7th March, 2018

Webiondev123 left a reply on Where Exactly Is My Database And How To See It In Linode/Forge? • 2 months ago

only this worked for me

mysql then I was in

Webiondev123 started a new conversation We Have E-mailed Your Password Reset Link! But No Email Coming In My Email ? • 2 months ago

Hi

I just managed to make the fastmail server work with all of your help. Now tI am getting no email reset link. How can I address this issue?

Thanks

Webiondev123 started a new conversation Which Files I Need To Modify To Get My Reset Password Working? • 2 months ago

I am seeing various advices online. Some showing .env with services.php some .env with mail.php some all of the three.

Pls tell me once I get info from my mail service provider which files and where I need to modify?

Thanks

Webiondev123 left a reply on Unable To Find Socket Transport Fastmail • 2 months ago

Its working after changing encryption to SSL...weird!

Webiondev123 left a reply on Unable To Find Socket Transport Fastmail • 2 months ago

yes I am able to connect now as well using telnet but still timed out in laravel reset email

@bashy

Webiondev123 left a reply on Unable To Find Socket Transport Fastmail • 2 months ago

strange but why it is still showing connection timed out?

Webiondev123 left a reply on Unable To Find Socket Transport Fastmail • 2 months ago

@bashy connect to address 72.52.4.119: Connection refused

Webiondev123 left a reply on Unable To Find Socket Transport Fastmail • 2 months ago

@bashy now its saying Connection to tcp://smtp.fastmail.com:465 Timed Out

Webiondev123 started a new conversation Unable To Find Socket Transport Fastmail • 2 months ago

Connection could not be established with host smtp.fastmail.com [Unable to find the socket transport "[my fastmail given app key]" - did you forget to enable it when you configured PHP? #32559]

MAIL_DRIVER=smtp MAIL_HOST=smtp.fastmail.com MAIL_PORT=465 [email protected] MAIL_PASSWORD=fastmail given app key MAIL_ENCRYPTION=fastmail given app key

Webiondev123 started a new conversation Where Is My Login Info For LISH Linode Once I Deploy With Forge? • 2 months ago

Hi.

It may be a noob question but I am unble to connect through LISH or PUTTY to server I deployed through FORGE...I need to manipulate by database.

Please help

Edit Your Profile
Update

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