Thameera

Thameera

Member Since 11 Months Ago

Experience Points 1,220
Experience
Level
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

06 Jul
5 months ago

Thameera started a new conversation Research Project Title For Bigdata

I am searching for final year research topic I am interested in networking and bigdata so i am searching for a research topic that combines both can you suggest some

26 Apr
7 months ago

Thameera started a new conversation Update A Float Column Value Results Rounding Off

I am saving float value into the database through laravel controller but it saved as rounded value,

  $remain=$avail-($needed*$unit);

here is my code even i changed it to fixed value but it rounded and saved to database

18 Apr
7 months ago

Thameera left a reply on Update Function In Multiple Database Connections In Same Laravel App

I got the ans i did by using eloquent model and connect the second database through it

class Item extends Eloquent
{
    protected $connection = 'mysql2';
    use SoftDeletes;
    protected $dates = ['deleted_at'];

    protected $table = 'kotitems';
    public $fillable = ['item_code','item_name','item_unit','min_level','meassure'];

}

Thameera started a new conversation Update Function In Multiple Database Connections In Same Laravel App

 $countries = $db_ext->table('kotitems')->get();
        print_r($countries);die;```
here i update to second database but this works fine but when i use update function'
like
```$db_ext->table('kotitems')->where('id',$items->name) ->update(['item_unit'=>$remain]);```
it searches in database 1  and pass error message as kot.table not found but it needs to serch in scs database i can read from second database but cant write in to it

10 Apr
8 months ago

Thameera started a new conversation Integrate Plupload With Javascript

I Have to integrate the plupload with laravel i have the code in core php,but still i did'nt understand the process of plupload.can you suggest any tutorials because i can't get with core php code or can you give some advices how can i integrate with laravel

04 Apr
8 months ago

Thameera left a reply on In CSS Max-width For 100% Is Working In Localhost But Not In The Server In Internet Explorer

yeah i tried overflow hidden and auto but it works fine for other browsers but not in internet Explorer(version is IE 11) even in localhost it works fine in internet explorer but not in server. i use this also but that is also not bring any changes in view.

03 Apr
8 months ago

Thameera started a new conversation In CSS Max-width For 100% Is Working In Localhost But Not In The Server In Internet Explorer

max-width for images is working perfectly when i run my code in localhost but when i run it on server url it does'nt work can you give some ideas how can i overcome from this

27 Mar
8 months ago

Thameera left a reply on Overflow Hidden Is Not Working In Internet Explorer

yeah i tried that but it doesn't work for internet explorer /media all/

    max-width: 100%;
    max-height: 100%;
    width: auto;
    display: inline;
    height: auto;
}
inline style
{
    display: inline;
}``` 
but this doesnt work auto function is not working it takes the orginal size of the image

26 Mar
8 months ago

Thameera started a new conversation Overflow Hidden Is Not Working In Internet Explorer

i gave overflow:hidden for the image viewer but that is ok in chrome and other browsers but not in internet explorer.can you suggest what can i do for that .

22 Mar
8 months ago

Thameera started a new conversation SetItem For InputId

localStorage.setItem('myForm',{id:this.id, value:this.value}) this is the one i wrote for save id's values in input type in myform local storage but no error in console but it doesnt get the values into it can you check and say whether it is right or not

20 Mar
8 months ago

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary

<html>
<head>
<script>
function clickCounter() {
    if(typeof(Storage) !== "undefined") {
    
        if (localStorage.clickcount)
        {
            localStorage.clickcount = document.getElementById('result').value;
        }
        else
        {
            localStorage.clickcount = 1;
        }
        document.getElementById('result').value =localStorage.clickcount;
    } else {
        document.getElementById("result").value = "Sorry, your browser does not support web storage...";
    }
}
</script>
</head>
<body>
<p><button onclick="clickCounter()" type="button">Click me!</button></p>
<input type="text" id="result"/>
<p>Click the button to see the counter increase.</p>
<p>Close the browser tab (or window), and try again, and the counter will continue to count (is not reset).</p>
</body>
</html>```
i modify the w3school code  to textbox but this code takes 1 in second click 
also  i need to modify this to without onclick function

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary

'''

function clickCounter() { if(typeof(Storage) !== "undefined") {
    if (localStorage.clickcount)
    {
        localStorage.clickcount = document.getElementById('result').value;
    }
    else
    {
        localStorage.clickcount = 1;
    }
    document.getElementById('result').value =localStorage.clickcount;
} else {
    document.getElementById("result").value = "Sorry, your browser does not support web storage...";
}

}

Click me!

Click the button to see the counter increase.

Close the browser tab (or window), and try again, and the counter will continue to count (is not reset).

'''

Thameera left a reply on Store Data Until The Submit Button Is Pressed As Temporary

but my problem is when user fills a form suddenly machine internet goes off or something happens to machine but user did'nt submit the data so data will be lost so i need to store the data temporally until user press submit how can i do that thorough laravel or should i learn about local storage API

Thameera started a new conversation Store Data Until The Submit Button Is Pressed As Temporary

I wan't to keep data inserted into form(text) before submit the form but i learned queue in laravel but i did'nt get the idea for that can you suggest the idea or tutorials for that

06 Mar
9 months ago

Thameera left a reply on Mail Config In Laravel

yeah i changed but still i get the error like stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed but 2 step varification is not enabled to my mail i used

Thameera started a new conversation Mail Config In Laravel

i try to send mail using laravel first i try with mailtrap.io for testing but it works fine when i change the env file to smtp it shows error as stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed or host not found my env file is belowMAIL_DRIVER=smtp

MAIL_PORT=587
[email protected]
MAIL_PASSWORD=malara97
MAIL_ENCRYPTION=TLS```
 can you help for correct configuration


15 Feb
9 months ago

Thameera left a reply on Categorize The Database Table According To A Field In Database

I have a category table that contains no of categories (id,categoryName) and training modules is the main table that contains details (traininngprogram_name,status,type,title(that is category-id), so i need to seperate the table as categories but when i use group by only one row comes from database for every category but i need all data's

Thameera started a new conversation Categorize The Database Table According To A Field In Database

i want to categorize the table according to the title category so i use this query

            ->where('training_module.status', 1)
            ->groupBy('training_module.type')
            ->orderBy('training_module.id', 'DESC')
            ->get();``` but it shows single item from every category not all items in a category how  can we do that
25 Jan
10 months ago

Thameera started a new conversation Onclick Function Is Not Working For Laravel Form Text

{!!Form::text('ret_date', Carbon\Carbon::today()->toDateString(), array('id' => 'datepicker7', 'class' => 'form-control','required' => 'required', 'placeholder' => 'Enter date'))!!} this is my form and my script onclick function is

            alert("hi");
}```
24 Jan
10 months ago

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

yes but after that it doesn't show error like that but value still doesn't printed in controler ''' public function post_return_add(ReturnRequest $request) { $sup = $request->get('sup_id'); print_r($sup); die;

    return redirect('admin/'.'stockoutward/'.'return')->with('success', 'Data '.' has been updated');

}

''' i change the code as simple

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

''' public function post_return_add(ReturnRequest $request) { foreach ($request->item_name as $key =>$v) { $da= Item::select('*')->where('id',$request->item_name[$key])->get(); foreach ($da as $da1){ $i_unit = $da1->item_unit; if($request->amo_return[$key] < $i_unit){ $data[]=array(

                    'sup_id'=>$request->get('sup_id'),
                    'bill'=>$request->get('bill'),
                    'ret_date'=>$request->ret_date,
                    'item_name'=>$request->item_name[$key],
                    'amo_return'=>$request->amo_return[$key],
                    'reason' => $request->reason[$key]);

            }else{
                return redirect('admin/'.'stockoutward/'.'return')->with('error', 'Data '.' has not been updated');
            }
        }
    }
    foreach ($data as $dat){
        $test= Item::select('*')->where('id',$dat['item_name'])->get();
        foreach ($test as $te){
            $i_unit = $te->item_unit-$dat['amo_return'];
            Item::where('id',$dat['item_name'])->update(['item_unit' => $i_unit]);
        }
    }
    Returns::insert($data);
    return redirect('admin/'.'stockoutward/'.'return')->with('success', 'Data '.' has been updated');

}

''' this is my controller post method but other variables are in laravel form so i changed only the sup_id request

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

yes i use $request->get('suppiler'); code in controller to pass value from blade as you mentioned as here

<select id='suppiler' name='suppiler'>
      <option value=''>Select supplier</option>
  @foreach ($supp as $key => $value) 
       <option value='{{$key}}'>{{value}}</option>
  @endforeach
</select>

but still it value doesnt pass to controller

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

and my laravel form is

{!!Form::label("Supplier name")!!}
                            {!!Form::select('sup_id1', $supp, null, ['class'=>'form-control', 'placeholder'=>'Select supplier name'])!!}

but it goes to database but why that html shows error as 0 found

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

                                    <option value="">--- Select State ---</option>
                                    @foreach ($supp as $key => $value)
                                        <option value="{{ $key }}">{{ $value }}</option>
                                    @endforeach
                                </select>```

                           
This is my html select form but its doesnt go to controller but i want to sepeate key and value to peform script functions
                    

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

yes but i want that in laravel form select because basic html is not passed to controller

23 Jan
10 months ago

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

can't i use laravel form to use key and value like html

Thameera left a reply on Use Key And Value In Laravel Form As In Html Select

''' Select supplier: --- Select State --- @foreach ($supp as $key => $value) {{ $value }} @endforeach Select bill no: --- Select State --- ''' this is my html form

Thameera started a new conversation Use Key And Value In Laravel Form As In Html Select

'''

{!!Form::label("Supplier name")!!} {!!Form::select('sup_id', $supp, null, ['class' => 'form-control', 'placeholder'=>'Select supplier name'])!!} {!!$errors->first('sup_name')!!} {!!Form::label("Bill/Invoice")!!} {!!Form::text('bill',null, ['class' => 'form-control','required' => 'required', 'placeholder' => 'Enter the Bill/Invoice'])!!} {!!$errors->first('bill')!!} '''

this is my laravel select form but i use basic html to populate dropdown based on previous dropdown now page shows error when submit as ''' Select supplier: --- Select State --- @foreach ($supp as $key => $value) {{ $value }} @endforeach Select bill no: --- Select State --- '''

21 Jan
10 months ago

Thameera left a reply on Path For Ajax In Laravel

can't we give route instead of url in script url because it doesnt show values of dropdown beacuse in url we cant check that route is passed or not

Thameera left a reply on Path For Ajax In Laravel

{ public function myformAjax($id) {

    $bill = DB::table("return")
        ->where("sup_id",$id)
        ->lists("bill","id");
    return json_encode($bill);
}}

this is my myform.ajax method

erorr shows Use of undefined constant stateID - assumed 'stateID' but stateID can be printed before ajax method but not identified in routes

20 Jan
10 months ago

Thameera started a new conversation Path For Ajax In Laravel

$('select[name="sup_id1"]').on('change', function() { var stateID = $(this).val(); if(stateID) { $.ajax({ url: "{{route( '/stockoutward/return/'+stateID)}}", type: "GET", dataType: "json", success:function(data) {

                        $('select[name="bill1"]').empty();
                        $.each(data, function(key, value) {
                            $('select[name="bill1"]').append('<option value="'+ key +'">'+ value +'</option>');
                        });

                    }
                });
            }else{
                $('select[name="bill1"]').empty();
            }
        });

    });

my code is this but my route shows error "Use of undefined constant stateID " like this my routes is Route::get('stockoutward/return/{id}',array('as'=>'myform.ajax','uses'=>'Admin\[email protected]')); what is the problem in my route

11 Jan
11 months ago

Thameera left a reply on Why Onchange Function Calling From Blade To Script Is Not Working

This is my code in javascript function myfunction() { alert("hi"); }

Thameera left a reply on Why Onchange Function Calling From Blade To Script Is Not Working

This is my code in blade

Select a product... @foreach ($states as $service) {{ $service->name }} @endforeach
10 Jan
11 months ago

Thameera left a reply on Why Onchange Function Calling From Blade To Script Is Not Working

i called onchange function in select form unfortunately that is not there

Thameera started a new conversation Why Onchange Function Calling From Blade To Script Is Not Working

''' Select a product... @foreach ($states as $service) {{ $service->name }} @endforeach ''' this is my blade but i put my function in script ''' function myfunction() { alert("hi"); }'''

but this simple function is not working

Thameera started a new conversation Pass Javascript Variable Into Blade Inside Javascript

$('#dynamic_field').append('Select a product... @foreach ($states as $service)\n' + ' {{ $service->name }}\n' + ' @endforeach {!! Form::text('code[]', null, array('class' => 'form-control', 'placeholder' => 'Enter code','id'=>'code[]')) !!}{!!Form::text('unit[]', null, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit')) !!}X'); }); this is my code here i have to pass javascript variable into input form but it doesnt work my code is this var test="test"; $('#unit').val(test);

09 Jan
11 months ago

Thameera started a new conversation Seperate Fields In Laravel Select Form

$states=TagList::all(); in controller i retrieve all elements and pass it to view i can use in basic html like Select a service... @foreach ($states as $service) {{ $service->name }} @endforeach but how can i seperate this in laravel select form {!!Form::select('name[]', $states->name, null, ['class' => 'form-control', 'placeholder'=>'Select a blog category','id'=>'name'])! it shows error also i need other seperations

Thameera left a reply on Method To Use Id When Input Type Is An Array

{!!Form::text('unit[ ]', null, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit'))!!} this is my form

Thameera started a new conversation Method To Use Id When Input Type Is An Array

$('#name').on('change',function(){ var price = $(this).children('option:selected').data('price'); $('#unit').val(price); }); this is my js function for get text field according to the change in dropdown but here i want input as multiple so i use array how can i define id here for js function {!!Form::text('unit', null, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit'))!!} this is my input form

Thameera started a new conversation Pass Processed Ajax Data For Options As Variable Into Laravel Form Input Select

$('select[name="unit"]').on('change', function() { var unitID = $(this).val(); if(unitID) { $.ajax({ url: '/stock_receive/add/ajax'+unitID, type: "GET", dataType: "json", success:function(data) {

                        $('select[name="name"]').empty();
                        $.each(data, function(key, value) {
                            $('select[name="name"]').append('<option value="'+ key +'">'+ value +'</option>');
                        });


                    }
                });
            }else{
                $('select[name="name"]').empty();
            }
        });

this is my code to filter the options for input select but here i am using laravel forms how can i change the code to pass data in laravel select input

my laravel input is like {!!Form::select('unit[]', $units, array('class' => 'form-control', 'placeholder' => 'Enter unit','id'=>'unit[]'))!!} here how can i post the data into $unit

Thameera left a reply on How To Initiate Lists

yes thats working

Thameera started a new conversation How To Initiate Lists

public function myform() { $states = DB::table("demo_state")->lists("name","id"); return view('myform',compact('states')); } here i use lists to get the id when name is selected but when compile it shows

"Call to undefined method Illuminate\Database\Query\Builder::lists()" this error am i need to initiate lists in model and how to do that

07 Jan
11 months ago

Thameera started a new conversation How To Get A Post Input Data In Another Page Which Is Posted In Different View

i want to print pdf report employee details between two dates so date is posted in on index page but i do filter function in pdf blade how can i do that

06 Jan
11 months ago

Thameera left a reply on Get Retrieved Value Of Database As Single Input

This code gives error as Call to undefined method stdClass::pluck()

Thameera started a new conversation Get Retrieved Value Of Database As Single Input

$user = DB::table('users')->where('name', 'John')->pluck("phonenumber"); when i use this type query it gives as array datatype even it is a single value how to get it as single value