amk

amk

Member Since 1 Year Ago

Experience Points
10,910
Total
Experience

4,090 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
50
Lessons
Completed
Best Reply Awards
3
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 3
10,910 XP
Oct
16
3 days ago
Activity icon

Replied to Data Is Not Updating

@nafeeur10 try with this... edit.blade.php

<form action="{{ route('client-update', $user->id) }}" method="POST" enctype="multipart/form-data">
            @csrf
            @method('PUT')
</form>

web.php

Route::group(['middleware' => ['auth'], 'prefix' => 'client'], function() {
Route::post('/update-user/{id}', '[email protected]')->name('client-update');
});

Controller

public function update(UpdateClientRequest $request, $id)
{
        $user->update($request->all());
}
Aug
29
1 month ago
Activity icon

Replied to How To Change Authorization In UniSharp/laravel-filemanager?

I login as admin,it does't not work.When I logged in with a user,it work well. I'am using multiple authentication guards in my project. @bobbybouwmann Is there anyway to define multiple authentication in filemanager?

Activity icon

Replied to How To Change Authorization In UniSharp/laravel-filemanager?

It doesn't work for me. @bobbybouwmann

It still Unauthorized.

Activity icon

Started a new Conversation How To Change Authorization In UniSharp/laravel-filemanager?

I have been change lfm.php

'middlewares'              => ['auth:admin'],

But it does't not work.

Please,any other idea or suggestion?

Jan
15
9 months ago
Activity icon

Replied to Can't Change Data After Using Axios

Got it!

mounted(){
  this.id = document.querySelector("input[name=tie]").value;
    axios.get(`/chapter/quiz/${this.id}`)
    .then(function (response) {
      this.question = response.data.title;
      console.log(response.data);
    }.bind(this))
    .catch(function (error) {
      console.log(error);
    });
}

here @cronix

.bind(this)

in mounted. I'm just beginner!

anyway?

Activity icon

Started a new Conversation Can't Change Data After Using Axios

<div id="app">
<p>@{{question}}</p>
<input type="text" v-model="question">
<div>
<script>
let app = new Vue({
  el:"#app",
 data: {
   question: null,

 },
mounted(){
    axios.get(`/chapter/quiz/`)
    .then(function (response) {
      this.question = response.data.title;
      console.log(response.data);
    })
    .catch(function (error) {
      console.log(error);
    });
}
})
</script>

In Console show data like that

Object { id: 1, title: "ttttttttttttt", chapter_id: 39, m_id: 1, c_type_id: 1, c_body_id: 2, a: "te", b: "ere", c: "tete", d: "te", … }

Why can not change question data?

Jan
06
9 months ago
Activity icon

Replied to Live Video Streaming

it is just only live streaming. After live streaming is finished,I want this video record. How to do it. Please suggest me. @topvillas @

Dec
12
10 months ago
Activity icon

Started a new Conversation It Doesn't Change Real Time In Vue-cli?

After I changed from App.vue,it doesn't change in browser. I need to rerun npm run dev for change updated data. Is it npm error?

Now,I am following this tutorial. https://laracasts.com/series/learn-vue-2-step-by-step/episodes/16

Dec
11
10 months ago
Activity icon

Replied to Trying To Get Property 'id' Of Non-object

    public function index()
    {
        
        $universities = University::all();
    dd($universities);
        return view('university.index', ['universities' => $universities]);
    }

check this! Is there have 'id' in object?

Dec
08
10 months ago
Activity icon

Replied to Uploaded Multiple File Function GetClientOriginalName() On Null

So,What is your problem? you should show us all code!

Activity icon

Replied to Property [post] Does Not Exist On This Collection Instance

:3

Route::get('/user/{id}/post',function($id){ 
$user = users::with('post')->where('id',$id)->get(); return $user->post; });

Activity icon

Replied to Uploaded Multiple File Function GetClientOriginalName() On Null

If my answer is correct,pls can you choose best answer?

Activity icon

Replied to Property [post] Does Not Exist On This Collection Instance

return $this->hasOne('App\posts', 'foreign_key', 'local_key');

replace your key to foreign_key and local_key

Activity icon

Replied to Uploaded Multiple File Function GetClientOriginalName() On Null

I think your problem is js!

onchange="showname()"

You changed your input type 'file' to 'text' with js! Remove your js on input type file. and test with this

<input type="file  name="filename[]" multiple>

Updated!

Activity icon

Replied to Uploaded Multiple File Function GetClientOriginalName() On Null

pls try with only one photo not multiple! Just test it! And,how is output?

<input type="file  name="filename">
Activity icon

Replied to Uploaded Multiple File Function GetClientOriginalName() On Null

Try with this!

if($request->hasFile('filename')){
 dd($request->file('filename');
 }
Dec
07
10 months ago
Activity icon

Replied to How To Convert Controller Things To Blade View In Laravel

<?php $cat = ""; ?>
@foreach($vehicles->unique('brandname') as $vehicle)
   @if($vehicle->categoryname != $cat )
            <?php $cat = $vehicle->categoryname; ?>
             {{$cat}}
            <br><br>
     @endif
    {{$vehicle->brandname}} <br>
@endforeach
Activity icon

Replied to How To Convert Controller Things To Blade View In Laravel

what do you wanna unique? categoryname or brandname?

Activity icon

Replied to Laravel Ckeditor Display Raw Data In The Database And Post Form

you should use it in index if you want to display content data! bez ckeditor also store html code.

{!! $content !!}
Activity icon

Replied to How To Convert Controller Things To Blade View In Laravel

Try with this!

<?php $cat = ""; ?>
@foreach($vehicles as $vehicle)
   @if($vehicle->categoryname != $cat )
            <?php $cat = $vehicle->categoryname; ?>
             {{$cat}}
            <br><br>
     @endif
    {{$vehicle->brandname}} <br>
@endforeach 
Activity icon

Replied to How To Convert Controller Things To Blade View In Laravel

@foreach($vehicles as $vehicle)
   @if($vehicle->categoryname != "")
            {{ $vehicle->categoryname }} <br><br>
     @endif
    {{$vehicle->brandname}} <br>
@endforeach
Activity icon

Replied to Laravel Ckeditor Display Raw Data In The Database And Post Form

So,what is your problem? you wanna display content data in index?

Dec
02
10 months ago
Activity icon

Replied to Cache And Pagination

@robstar thank you Sir... If I create new user,how to delete old cache?

Activity icon

Replied to Cache And Pagination

@jlrdw So,you mean I shouldn't use Cache if data is usually changed?

Activity icon

Started a new Conversation Cache And Pagination

$page = $request->has('page') ? $request->query('page') : 1;

 $user = Cache::rememberForever('user_'.$page, function () use ($course_id) {
      return User::where('course_id',$course_id)->pagination('5');
  });

I wanna know if a user create or edit,how do I forget cache?

Nov
29
10 months ago
Activity icon

Started a new Conversation Call To Undefined Method Maatwebsite\Excel\Excel::create()

Hi,guys... I have been add providers and aliases. I can't find yet! Still, I got the error message

 Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to undefined method Maatwebsite\Excel\Excel::create()

and my package version

        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.7.*",
        "laravel/tinker": "^1.0",
        "maatwebsite/excel": "^3.1",
        "predis/predis": "^1.1",
        "uxweb/sweet-alert": "^2.0"

controller

use Excel;

    public function export_list()
    {
      Excel::create('Export data', function($excel) {

      $excel->sheet('Sheet', function($sheet) {
      $data = User::where('city','ygn')->get();

       $sheet->fromArray($data);
      });
    })->download('xls');
    }

Pls,can you suggest me?

Nov
24
10 months ago
Activity icon

Started a new Conversation Why Show Old Reply In My Laracasts Profile?

After I edited my reply,don't show update reply in my profile. Is that true? Why?

Activity icon

Replied to After Form Validation All Filled Data Have Been Reset

May I suggest you.You should learn form Cronix mentioned link.

Activity icon

Replied to After Form Validation All Filled Data Have Been Reset

<div class="form-group row">
                        <label for="colFormLabelSm" class="col-sm-12 col-form-label col-form-label-sm mb-md-3 mt-md-3">ඔබගේ රැකියා තත්ත්වය සඳහන් කරන්න?</label>
                        <div class="col-sm-12">
                            <select id="show" class="form-control col-sm-12" name="job[]" required>
                                <option value="" >රැකියාව</option>
                                <option value="රැකියා විරහිත" {{ (collect(old('job'))->contains('රැකියා විරහිත')) ? 'selected':'' }}>රැකියා විරහිත</option>
                                <option value="පූර්ණ කාලීන සේවය" {{ (collect(old('job'))->contains('පූර්ණ කාලීන සේවය')) ? 'selected':'' }}>පූර්ණ කාලීන සේවය</option>
                                <option value="අර්ධ කාලීන සේවය" {{ (collect(old('job'))->contains('අර්ධ කාලීන සේවය')) ? 'selected':'' }}>අර්ධ කාලීන සේවය</option>
                                <option value="ගෘහණියකි" {{ (collect(old('job'))->contains('ගෘහණියකි')) ? 'selected':'' }}>ගෘහණියකි</option>
                            </select>
                        </div>
                    </div>

change like that

Activity icon

Replied to After Form Validation All Filled Data Have Been Reset

Can you show the code? How did you test?

Activity icon

Replied to After Form Validation All Filled Data Have Been Reset

and this for input type="text"

    <input type="text" name="title"  value="{{old('title')}}">
Activity icon

Replied to After Form Validation All Filled Data Have Been Reset

It is example...

<select name="options[]" class="form-control" multiple>
        <option value="test" {{ (collect(old('options'))->contains('test')) ? 'selected':'' }}>test</option>
        <option value="test1" {{ (collect(old('options'))->contains('test1')) ? 'selected':'' }}>test1</option>
</select>
Activity icon

Replied to After Form Validation All Filled Data Have Been Reset

you mean after validation failed,show old value?

Nov
23
10 months ago
Activity icon

Replied to Api Routes Not Working

I think your Xampp error.Pls check back xampp connection!

Nov
22
10 months ago
Activity icon

Replied to How To Automatically Download A File Of Storage???

Try this bro.... I have been test it. It generate myfile.txt in public folder. pls check public folder.

public function fordownload(Request $request){
 $fileName= "myfile.txt";
 \File::put(public_path($fileName),$request->info);
 return response()->download($filename);
}
Activity icon

Replied to Array To String Conversion (SQL: Insert Into `questions

I use serialize for insert array in column!

$data["ElectricMedia"] = serialize($request->ElectricMedia);

check this tutorial https://www.w3resource.com/php/function-reference/unserialize.php

Activity icon

Replied to How To Automatically Download A File Of Storage???

In Controller

use Storage;

public function fordownload(Request $request){

Storage::put('your_file_name', $request->info);

return Storage::download('your_file_name'); 

}

In Route

Route::post('download','[email protected]')->name('down');

In Blade

            <form action="{{route('down')}}" method="post">
                {{ csrf_field() }}
                <div class="form-group">
                    <label for="info">Add Info</label>
                    <input type="text" name="info">
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>

you want like that?

Activity icon

Replied to Array To String Conversion (SQL: Insert Into `questions

this is error bez of multiple select..... :3

<select class="form-control col-sm-12 js-example-basic-multiple" name="ElectricMedia[]" multiple="multiple">

change like that if you don't need multiple select

<select class="form-control col-sm-12 js-example-basic-multiple" name="ElectricMedia">
Activity icon

Replied to Resource Route Parameters Error

@TYKUS - Thank sir...

Nov
21
10 months ago
Activity icon

Replied to Resource Route Parameters Error

@TYKUS - It is query string parameter....

Activity icon

Started a new Conversation Resource Route Parameters Error

Too few arguments to function App\Http\Controllers\CourseController::index(), 0 passed and exactly 1 expected

In web.php

    Route::resource('course','CourseController',['parameters' => [
    'course' => 'city',
    ]]);

Controller

    public function index($city)
    {
        dd($city);
    }

and this is from blade

<a class="" href="{{route('course.index',$city)}}">Course</a>

this is url

http://127.0.0.1:8000/backend/course?ygn

What's wrong ?

Nov
16
11 months ago
Activity icon

Replied to Sorry, The Page You Are Looking For Could Not Be Found.

Change like this...

<button type="submit" class="btn btn-primary">Submit</button>

Have you tried with dd() from controller?

public function submitEditSchedule(Request $request) {

dd($request->all);
Nov
05
11 months ago
Activity icon

Replied to I Am Calling Query In Every Single Function For Navbar

Can you show me example sir @tykus .

Activity icon

Started a new Conversation I Am Calling Query In Every Single Function For Navbar

I am calling query in every single function for navbar

  public function home()
  {
        $navbar = Course::all();
        $class = Class_::where('is_delete',0)->get();
        return view('frontend.home',compact('class','navbar'));
  }


    public function cart_list()
    {
     $navbar = Course::all();
        return view('frontend.cart_list',compact('navbar'));
    }

    public function class_list($course_)
    {
        $navbar = Course::all();
        $class = Class_::all();
        return view('frontend.class_list',compact('class','navbar'));
    }


    public function classdetail($id)
    {
        $navbar = Course::all();
        $class = Class_::findOrFail($id);
        return view('frontend.class_detail',compact('class','navbar'));
    }

my file structure like this..

header.blade.php
navbar.blade.php
master.blade.php
footer.blade.php

I don't want to call navbar query in every function.. Pls suggest me..

Sep
11
1 year ago
Activity icon

Started a new Conversation Uncaught (in Promise) DOMException: The Play() Request Was Interrupted By A Call To Pause()?

I can't find yet this error! and audio can't play after button click.

<button id'="next">next</button>

                <audio id="aud" style="display:none;" controls controlsList="nodownload">
 <source id="audos" src="http://www.hubharp.com/web_sound/BachGavotteShort.mp3"></source>
          Your browser does not support the audio element.
                   </audio>
                                                                       
                     <div>
     <i class="fa fa-play-circle-o" id="play" style="font-size:48px;"></i>
     <i class="fa fa-pause-circle-o" id="pause" style="font-size:48px;"></i>
                                                                    
                      </div>




<script>

                                $('#play').on('click',function() {
                                        var playPromise = document.getElementById('aud').play();
                                        $('#play').css("display", "none");
                                        $('#pause').css("display", "block");
                                  
                                });

                                $('#pause').on('click',function() {
                                        document.getElementById('aud').pause();
                                        $('#pause').css("display", "none");
                                        $('#play').css("display", "block");
                                    
                                });

                $('#next').on('click',function() {
                $.ajax({
                    type:'get',
                    url:"{!!URL::to('/next')!!}",
                    data:{.........},
                    success:function(response){
                    $('#audos').attr('src',"{{asset('audio/')}}"+response.audio);
                    }

</script>
Aug
11
1 year ago
Activity icon

Started a new Conversation Setting Up Ssl Certificate

This Question is not suitable for this site.But I need help... I tired to generate ssl csr code

cd /etc/ssl

openssl genrsa -out example.com.key 4096

openssl req -new -key example.com.key -out example.com.csr

and I changed like that...

sudo nano /etc/nginx/sites-available/example.com

I added these code..

 listen 443 ssl;
 ssl_certificate /etc/ssl/example.com.csr;
 ssl_certificate_key /etc/ssl/example.com.key;

and

sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/

sudo nginx -t

it show errors message like that

nginx: [emerg] PEM_read_bio_X509_AUX("/etc/ssl/example.com.csr") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line:Expecting: TRUSTED CERTIFICATE)
nginx: configuration file /etc/nginx/nginx.conf test failed

and then, I copied csr code and pasted to name.com... show like that

Your domain (www.example.com) doesn't match the domain in the CSR (false.false). 

:(

Aug
03
1 year ago
Activity icon

Replied to A User Can Listen Only Twice Mp3 File On My Web...How To Do That?

var count = 1;
audio.onended = function(){
if(count < 2){
count++;
this.play();
}else if(count == 2){
alert('finished');
    }
}

I'm done with js!

Jul
29
1 year ago
Activity icon

Started a new Conversation A User Can Listen Only Twice Mp3 File On My Web...How To Do That?

Anyone can suggest me?