kankai

kankai

Member Since 1 Year Ago

Experience Points 6,020
Experience Level 2

3,980 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 39
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

23 Jun
2 days ago

kankai started a new conversation Unicode Problem, Output Strange Words When In Chinese

Hi guys,

I'm using summernote editor post content and upload image to my website. But i found out unicode problem and save strange words to my db.

常勇和舒森不仅是男神女神,也是超有才华的YouTuber哦!从高中毕业到大学毕业,两人都在彼此的身边!【高中到大å­

i suspect these code will affect to output but i'm not good with these

$detail=$request->input('detail');

$dom = new \DomDocument();

$dom->loadHtml($detail, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); 
        
$images = $dom->getElementsByTagName('img');

foreach($images as $k => $img){

            $data = $img->getAttribute('src');

            list($type, $data) = explode(';', $data);

            list(, $data)      = explode(',', $data);

            $data = base64_decode($data);

            $image_name= "/upload/" .time().$k.'.jpg';


            $path = public_path() . $image_name;

            file_put_contents($path, $data);

            $img->removeAttribute('src');

            $img->setAttribute('src', $image_name);

        }

        $detail = $dom->saveHTML();
20 Jun
5 days ago

kankai left a reply on Return Html Code To View With Javascript Have Repeat Issue

Hi guys, i solved the problem. It's because view structure cause post form POST it several times. I restructure the view and problem solved, thanks.

kankai left a reply on Return Html Code To View With Javascript Have Repeat Issue

@CRONIX - It still will repeat view, i think my view structure have problem.

19 Jun
6 days ago

kankai started a new conversation Return Html Code To View With Javascript Have Repeat Issue

Hi guys,

I have use ajax post and get return data to views, but i notice that it have repeat my html code issue.

Controller

$view = view ('content', compact('todayDate'));
return $view;

Ajax

success: function(response){
    console.log('test')
    data(response);
 },


function data(data){
    $('#content').empty().html(data);
}   

View

<form id="selectDate" action="" method="">
                                            <li>
                                                <div class="input-group">
                                                    <input autocomplete="off" id="date_from" name="date_from" type="text" class="form-control mydatepicker" placeholder="From current date">
                                                    <div class="input-group-append">
                                                        <span class="input-group-text"><i class="fa fa-calendar"></i></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li>
                                                <div class="input-group">
                                                    <input autocomplete="off" id="date_to" name="date_to" type="text" class="form-control mydatepicker" placeholder="To current date">
                                                    <div class="input-group-append">
                                                        <span class="input-group-text"><i class="fa fa-calendar"></i></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li>
                                                <button type="submit" class="btn btn-info">Check</button>
                                            </li>
                                        </form>

I try to use console 'test' at the first time, it come out once 'test'. The second time it will come out twice 'test', and the third time it will come out 3 times.

17 Jun
1 week ago

kankai left a reply on How To Get New Data With Ajax Post?

@REACHED - It show fully of updated html code

kankai started a new conversation How To Get New Data With Ajax Post?

Hi guys,

I'm new with ajax. I try to make an query about searching data from date to date, i can create post datepicker input to controller but don't know how to get updated data return back to views.

Here are my code, thank you.

Views:

<input autocomplete="off" id="date_from" name="date_from" type="text" class="form-control mydatepicker" placeholder="From current date">
<input autocomplete="off" id="date_to" name="date_to" type="text" class="form-control mydatepicker" placeholder="To current date">

<script type="text/javascript">
        submitForm('#selectDate','{{ url("analysis/data") }}')

    function init(){
            $.get('/analysis/datainfo', function(data){
                $('#datainfo').empty().html(data)
            })
        }
    
        init()
</script>

Javascript:

function submitForm(){
  var parameterLength = arguments.length;
  var formID = arguments[0];
  var postUrl = arguments[1];
  
  $(document).ready(function() {
    $(formID).submit(function (ev) {
         $.ajaxSetup({
             headers: {
                 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
             }
        });
        $.ajax({
            method: 'POST', // Type of response and matches what we said in the route
            url: postUrl, // This is the url we gave in the route
            data:$(formID).serialize(), // a JSON object to send back
            success: function(response){ // What to do if we succeed
              console.log(response);
              result(response);
            },
            error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail

              console.log(JSON.stringify(jqXHR));
              console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
            },
        });
        ev.preventDefault();
    });
  });
}

controller:

public function show(Request $request)
    {
        //
        $start = $request->date_from;
        $end = $request->date_to;

        if ($start > $end) {
            $msg = 'Invalid Start/End date setting';
            $status = 'error';
            $timer = 2000;
        }else{
            $todayDate = $start;
            // $todayDate = date('Y-m-d');
            $categoryList = category::where('status', 0)->get();
            $dailyReport = report::where('type', 0)->whereDate('created_at', $todayDate)->get();
          

            $msg = 'Operation successful';
            $status = 'success';
            $timer = 1500;

            return response()->json([
                // 'effect' => 'updated',
                'msg' => $msg,
                'status' => $status,
                'timer' => $timer,
                'showConfirm' => false,
                // 'btnTxt' => 'Continue?',
                // 'confirmBtn' => '#ffcc00',
                'position' => 'bottom-end',
                // 'showCancel' => true,
                // 'cancelBtn' => '#ff0000',
                'mini' => true,
                // 'debug' => $dateFrom,
            ]);  


            return view ('data', compact('todayDate','categoryList','dailyReport'));
           
        }     
09 Jun
2 weeks ago

kankai left a reply on Get Element ID Value Under Element ID

@JOHNBRAUN - Thanks @johnbraun , solved the problem =)

07 Jun
2 weeks ago

kankai left a reply on Get Element ID Value Under Element ID

@JOHNBRAUN - i try to use option 1 it come out an error.

ajax.js:99 Uncaught TypeError: Cannot read property 'id' of null at HTMLFormElement. (ajax.js:99) at HTMLFormElement.dispatch (jquery.min.js:2) at HTMLFormElement.y.handle (jquery.min.js:2)

kankai started a new conversation Get Element ID Value Under Element ID

Hi Guys,

I'm facing problem which need to get element id value under a element id.

<form id="form0" action="">
<input id="gameID" type="text" class="form-control" placeholder="Game ID">
</form>

anyway to get gameID value with javascript?

06 May
1 month ago

kankai left a reply on Can I Flexible Change Function Name In Javascript?

@FTIERSCH - Is this correct?

function submitForm(){
  var parameterLength = arguments.length;
  var formID = arguments[0];
  var postUrl = arguments[1];
  var _func = arguments[2];
  
  //
  $(document).ready(function() {
    $(formID).submit(function (ev) {
        //
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
        $.ajax({
            method: 'POST', // Type of response and matches what we said in the route
            url: postUrl, // This is the url we gave in the route
            data:$(formID).serialize(), // a JSON object to send back
          success: function(response){ // What to do if we succeed
              var _func = result(_data) {

}

          },
          error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
            console.log(JSON.stringify(jqXHR));
            console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
          }
        });
        ev.preventDefault();
    });
  });
}


function result(_data){
  console.log(_data);
}

submitForm('#requestForm','home', resFunc)

kankai started a new conversation Can I Flexible Change Function Name In Javascript?

Hi guys,

I'm currently creating my own javascript library, so i started with ajax submit form and i need to make it have flexible result effect. Is there anyway to make function name replace with parameter?

function submitForm(){
  var parameterLength = arguments.length;
  var formID = arguments[0];
  var postUrl = arguments[1];
  var _func = arguments[2];
  
  //
  $(document).ready(function() {
    $(formID).submit(function (ev) {
        //
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
        $.ajax({
            method: 'POST', // Type of response and matches what we said in the route
            url: postUrl, // This is the url we gave in the route
            data:$(formID).serialize(), // a JSON object to send back
          success: function(response){ // What to do if we succeed
              _func(response);
          },
          error: function(jqXHR, textStatus, errorThrown) { // What to do if we fail
            console.log(JSON.stringify(jqXHR));
            console.log("AJAX error: " + textStatus + ' : ' + errorThrown);
          }
        });
        ev.preventDefault();
    });
  });
}


function result(_data){
  console.log(_data);
}

submitForm('#requestForm','home','result')

Something like this but i got an error said that _func is not a function. Anyway to make this works?

02 May
1 month ago

kankai left a reply on Add Column With Javascript But Cant Add Another One

@PHPHUPPTECHNOLOGIES - oh god, just a little changes. Thanks!

kankai started a new conversation Add Column With Javascript But Cant Add Another One

Hi all, i'm not good in javascript and i try to create a button that can add more row on my table. But it only can add once and can't continue add another one when i click button again.

<script type="text/javascript">
        var count=0;
        var tr = document.createElement("TR");
        var td0 = document.createElement("TD");
        var td1 = document.createElement("TD");
        var input0 = document.createElement("INPUT");
        var input1 = document.createElement("INPUT");
        input0.setAttribute('type', 'text');
        input0.setAttribute('class', 'form-control');
        input1.setAttribute('type', 'text');
        input1.setAttribute('class', 'form-control');

        document.getElementById("medicine_btn").addEventListener("click", function(event){
            event.preventDefault()
            //
            count++
            form = document.getElementById('medicine_form');
            input0.setAttribute('name', 'no'+count);
            input1.setAttribute('name', 'medicine'+count);
            //
            td0.appendChild(input0);
            td1.appendChild(input1);
            //
            tr.append(td0,td1);
            form.append(tr);
            console.log(count);
        });

         
           
         
    </script>
01 May
1 month ago
30 Apr
1 month ago

kankai started a new conversation Save Array Type To Database And Read It With Separate Format

Hi all,

I have a project that need to save medicine data to database which is need to use array. But i have no idea how to save it in array format or json format.

The flow should be like this

medicineA  x3
medicineB x4
medicineC x2

save to database column should show this

"medicineA" : {
    "quantity" : 3
},
"medicineB" : {
    "quantity" : 4
},
"medicineC" : {
    "quantity" : 2
},

I imagine will be like this, hope this figure you can understand and thanks for your help

19 Feb
4 months ago

kankai started a new conversation How To Create Multiple Ip Addresses On Single Server

Hi guys,

I'm new to server and server network, i have few project that need to host few website on single centos server and also with different ip addresses.

I have google on it and get some solution that server need IIS but i'm have no idea how to setup IIS to server.

Is there any requirement for server to setup this multiple ip addresses on single server?

09 Jan
5 months ago

kankai left a reply on Get Looping Data Failed Sometimes

Sorry about bad english, what i need to get is something like this.

I have a wallet UID called '91211', and under this UID have 3 IDs which is IDA,IDB, IDC.
in 'game_id' db table, i have IDA, IDB, IDC, each IDs have their own data like
[id => IDA , reload => 9 ] 
[id => IDA , reload => 10]
[id => IDB , reload => 9 ] 
[id => IDB , reload => 10]
[id => IDB , reload => 9 ] 
[id => IDC , reload => 10]
[id => IDC , reload => 9 ] 

So when i search UID '91211', i can get all data about this UID.

07 Jan
5 months ago

kankai started a new conversation Get Looping Data Failed Sometimes

Hi All,

I have facing this problem when i use query parameter grouping, in my form i have search an UID : 12345 which is contain IDA, IDB, IDC. So i need to get both of this three ID data, at the end i found out some UID can get all IDs data but some only get first ID data.

$UID = $request->player_id;
$tags = DB::table('game_id')->where('status',0)->where('wallet',$UID)->pluck('game_id');

 $gameData = id_data::where(function($query) use($tags)
                    {
                        foreach($tags as $tags)
                        {
                            $query->where('game_id',$tags)->orWhere('game_id', $tags);
                        }
                    })->orderBy('created_at','dsc')->get();

Is there something wrong with my code? Please help me, thank you very much.

02 Jan
5 months ago

kankai started a new conversation Permission Denied For Laravel Storage Logs

Hi All,

I have installed laravel in centos7 with apache, after intalled laravel i found out this error message

The stream or file "/var/www/html/storage/logs/laravel-2019-01-03.log" could not be opened: failed to open stream: Permission denied

And then i had tried to change storage folder to chmod -R 777 and even tried to change whole laravel application folder to chmod -R 777. It's still came out same message.

kankai left a reply on Failed To Grab Laravel From Git

@TOKOIWESLEY - @tokoiwesley solved this problem, thank you very much.

kankai started a new conversation Failed To Grab Laravel From Git

Hi all,

I have setup a new centos server for my laravel project, but after i installed apache, mysql, php and composer i can't grab latest laravel git.

It came out a error message like this:

[RuntimeException]                                                                                              
  Failed to clone https://github.com/laravel/laravel.git, git was not found, check that it is installed and in y  
  our PATH env.            

First time saw this problem, anything goes wrong? Thank you

14 Nov
7 months ago

kankai left a reply on Cron Job For Godaddy Shared Hosting

@SKOOBI - Same, still not working :(

kankai started a new conversation Cron Job For Godaddy Shared Hosting

Hi All,

I'm doing a web and would like to insert data by using laravel cron job, but godaddy is different from my valet localhost. I can't use

 * * * * * /usr/local/bin/php /usr/local/var/www/projectName/artisan schedule:run >> /dev/null 2>&1

I also did some research and found out need to do a setting in cpanel but it not successful also. https://my.godaddy.com/help/create-cron-jobs-3548

Anyone have idea? thank you

13 Nov
7 months ago

kankai left a reply on Show Select Array Value In View

@ANDREICH1980 - The error message is 'Undefined index', but now i tried your code and problem has been solved. Thank you very much!

kankai started a new conversation Show Select Array Value In View

Hi all,

I'm new with eloquent realationship, what i'm doing is having 3 database tables and i success get all data. I'm joining database table 'work' with 'wallet' and 'appsData', but i'm facing problem that how to show these data in view.

[{"game_id":"1001","check_wallet":[{"id":355,"wallet":"20314","game_id":"1001","status":0,"warning":0,"create_user":"WENDY","edit_user":null,"delete_user":null,"created_at":"2018-06-01 08:53:07","edited_at":"2018-06-01 08:53:07","check_detail":[{"id":1228,"wallet_id":"20314","apps_type":"whatsapp","prev_apps_id":null,"apps_id":"abc","type":null,"remarks":null,"status":0,"created_at":"2018-06-01 08:53:07","created_user":"WENDY"}]}]}

I need to show "apps_type", i have try echo it with {{ $data->check_detail->apps_type }} But it comes out error, what is the correct syntax to select this value in array? Thanks

13 Oct
8 months ago

kankai started a new conversation Give Database A Variable And Get Data

Hi all,

i have a database with table name 'sku_code', and then i need to get database data with variable.

$productData = DB::table('ecommerce_products')->where('slug', $value)->get();
dd($productData['sku_code'] );

It come out an error, is there any way to get a value like this?

04 Sep
9 months ago

kankai started a new conversation Query Multiple Data

Hi all,

I need to return a result with multiple query, here is my code and it only return with '[ ]' symbol.

$tags = DB::table('game_id')->where('status',0)->where('wallet',$player_id)->pluck('game_id');
        
            $data = oldwork::where(function($query) use($tags)
            {
                foreach($tags as $tags)
                {
                    $query->where('game_id', $tags);
                }
            })->get();

            return $data;   

It's there any problem with my code?

16 Aug
10 months ago

kankai left a reply on Custom Make Language File And Keywords

@Yamen Thank you, solve my problem :)

13 Aug
10 months ago

kankai started a new conversation Custom Make Language File And Keywords

Hi Guys,

I have use laravel create a page that use js localstorage to set website language but i wish to key in my keyword in array form instead of using laravel set locale function. But i have no idea how to make a language file and get the keyword direct from language file to view blade.

09 Aug
10 months ago

kankai left a reply on Enter To Submit Form And Load Certain Part

It's work very nicely, thank you very much! :)

kankai left a reply on Enter To Submit Form And Load Certain Part

I never use preventDefault() before, for my understanding is this will stop browser reload page after form has submitted?

kankai left a reply on Enter To Submit Form And Load Certain Part

Is there any way that can make the page not refresh after submit form? If scroll to middle part of page, after submit form it will refresh and go back to top of the page.

kankai left a reply on Enter To Submit Form And Load Certain Part

I tried to use ajax with tag, it will reload whole page when submit form. Do i need to remove and only use ajax?

   <form method="POST">
    <div>
        <input type="text" name="comment">
        <button type="submit" class="btn btn-info">Done</button>
    </div>
    </form> 

kankai started a new conversation Enter To Submit Form And Load Certain Part

I'm doing a comment form like Facebook comment which can post it with 'Return' key and reload comment part. Why i need to reload only comment part because this site have other huge information beside than comment part.

I have tried to use it will refresh whole page and take long time to finish loading a page. I believe this will need javascript to implement it, any reference or example that i can refer to?

Sorry about my broken english, hope your guys can understand my question.

07 Aug
10 months ago

kankai left a reply on Phpmyadmin 404 Not Found

Still not working, i had been change apache2.conf

<Directory /var/www/html/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

kankai started a new conversation Phpmyadmin 404 Not Found

Hi All,

I have installed laravel in aws ubuntu free tier server, for the first i have edit document root to www/html/public It has fixed all the route problem, but when i install phpmyadmin it come out phpmyadmin out 404 not found. Is it route conflict with laravel route?

Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial

i have try

sudo ln -s  /usr/share/phpmyadmin  /var/www/html/
Include /etc/phpmyadmin/apache.conf

created .  /etc/apache2/conf-enabled/phpmyadmin.conf

service apache2 restart

These will not work for me :(

23 Jul
11 months ago

kankai left a reply on Store Array Data Using Serialize

@m7vm7v Thanks for the advice and solution, issue solved and after reconsider illegal issue i change saving data to mobile no and telco. =)

20 Jul
11 months ago

kankai started a new conversation Store Array Data Using Serialize

Hi Guys,

I creating a page that can let user store in multiple bank name and bank account number. So what i'm thinking is store all bank details into database one column.

This is what i figure out, but i have no idea how to convert input to array type and serialize store into db and update array data.

View will be like this:

<table cellpadding="2" cellspacing="2" border="1" class="table table-striped table-bordered data-table">
                                <thead class="thead-default">
                                    <tr>
                                        <td>Bank</td>
                                        <td>Account Number</td>
                                        <td></td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td> 
                                            <select name="bank" class="form-control">
                                                @foreach ($banklists as $list)
                                                 <option value="HSBC">HSBC</option>
                        <option value="OCBC">OCBC</option>
                                                @endforeach
                                            </select>
                                        </td>
                                        <td>{!! Form::text('full_name' ,null ,['class' => 'form-control', 'style' => 'max-width:300px;','required']) !!}</td>
                                        <td><button class="btn btn-danger">Add New Bank Account +</button></td>
                                    </tr>
                                </tbody>
                            </table>
 $bankDetails = array(
            'bank' => ['HSBC', OCBC],
            'account' => ['1829571929','12391023918'],
 );

serialize output should be like this, but how i'm going to select either one bank to update data?

"a:2:{s:4:"bank";a:2:{i:0;s:4:"HSBC";i:1;s:4:"OCBC";}s:7:"account";a:2:{i:0;s:10:"1829571929";i:1;s:11:"12391023918";}}"
24 Jun
1 year ago

kankai left a reply on Can't Connect To Mysql

I got the solution which is change user password format from caching_sha2_password to mysql_native_password :)

20 Jun
1 year ago

kankai started a new conversation Can't Connect To Mysql

Hi Guys,

I have using MacOS High Sierra, before reformat my mac i have used laravel valet, homebrew, mysql. But this morning i reformat my mac, and it cannot connect to mysql anymore.

when i use "php artisan migrate", it comes out this message

Illuminate\Database\QueryException  : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations)

  at /Users/limkankai/Sites/blog/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| 

.env file

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:wnv3/dMuY9E6gd3wxPImqmBJ1/hFfIzsp7uHH8QrAW0=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

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

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

01 Jun
1 year ago

kankai started a new conversation Allow Facebook But Block Messenger

Hi all,

My office employee are using facebook when they are free, but i'm wish to not allow them to use fb messenger chat or voice call/video call. Is there anyway that can make router setting can block only messenger ip or port? Or make a setting in pc(window os)?

Thank you

30 May
1 year ago

kankai left a reply on Get Multiple Value From Views

Thank you very much :) @Cronix @Snapey

kankai started a new conversation Get Multiple Value From Views

Hi All,

I have use laravel do a search form with wallet id, from what wallet id get can make it add in game id or edit current id. But now i'm facing a problem is how to store a variable in views and pass it back to controller or send multiple value from button?

<table>
    <tr>
                <td>{{ $walletID }}</td>
                <td>{{ $gameName }}</td>
        <td>{{ $list->game_id }}</td>
                <td>
                      <form method="POST" action="">
                      {{ csrf_field() }}
                                    <input name="gameid_input" placeholder="{{ $game_id }} ID" class="form-control" required>
                 </td>
                 <td>
                       <button type="submit" class="btn btn-info" name="game_id" value1="{{ $walletID }}" value="{{ $gameName }}">Add +</button>
                    </form>
        </td>
         </tr>
</table>

What i want is pass wallet ID and gameName to controller, thank you.

19 May
1 year ago

kankai left a reply on Get Multiple Condition Into Array

@biishmar I just watch that tutorial video from laracast, will try out will the solution. Thank you

18 May
1 year ago

kankai started a new conversation Get Multiple Condition Into Array

Hi guys,

I have a question it's about to get 'not fix amount' condition from query. This is my code and i try to get it push into array but it's not working, any other way to make this happen?

$totalgameIdcount = DB::table('wallet_id')->where('status',0)->where('wallet',$player_id)->where('game_id', '<>', '', 'and')->count();

$totalgameId = DB::table('wallet_id')->where('status',0)->where('wallet',$player_id)->where('game_id', '<>', '', 'and')->pluck('game_id');

$playeridArray=array();

 for($i = 0; $i = $totalgameIdcount-1; $i++)
{
    
    $playeridArray = DB::table('oldwork')->where('status',0)->where('game_id',$totalgameId[$i])->get();
    array_push($playeridArray, $playeridArray);
 }

this is about i search wallet ID, and under it have few game ID. And i need to use game ID to search all data about these game ID.

Thank you

13 May
1 year ago

kankai started a new conversation Centos Server Web Service Fail To Start

Hi guys,

I'm very new to server side. When i try to start web service in server, it happen error.

May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal httpd[21930]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal httpd[21930]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal httpd[21930]: no listening sockets available, shutting down
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal httpd[21930]: AH00015: Unable to open logs
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal kill[21931]: kill: cannot find process ""
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal systemd[1]: httpd.service: control process exited, code=exited status=1
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal systemd[1]: Failed to start The Apache HTTP Server.
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal systemd[1]: Unit httpd.service entered failed state.
May 13 16:30:13 ip-xxx.ap-southeast-1.compute.internal systemd[1]: httpd.service failed.

May i know how can i fix this? Currently i can view my laravel application in this server.

03 May
1 year ago

kankai left a reply on From Javascript Var Set As Php Var

ok, thank you guys. Will try it out with ajax

02 May
1 year ago

kankai left a reply on From Javascript Var Set As Php Var

@Nash Any example so that i can pass JS var to php back end?