Msoft

Msoft

Member Since 1 Year Ago

Experience Points
4,230
Total
Experience

770 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
0
Lessons
Completed
Best Reply Awards
0
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 1
4,230 XP
18 Jul
2 months ago

Msoft left a reply on How To Validate Phone Number With Country Code?

@cronix is it like required|regex:/(0)[0-9]{9}/ but how can I use + value

Msoft started a new conversation How To Validate Phone Number With Country Code?

I have validated in My Controller phone number as following,

$this->validate($request, [
    
    'phone'    => 'required'
]);

I need to validate this phone number with country code like +61 how can I do this?

13 Jul
2 months ago

Msoft left a reply on How To Customized Email Name In The Laravel App?

@snapey OK using Gmail how could I print sender email id here?

Msoft left a reply on How To Customized Email Name In The Laravel App?

@snapey yes sender email or customized name like PPS

Msoft started a new conversation How To Customized Email Name In The Laravel App?

I am using Laravel 5.7 and using Gmail to sending emails from My App. it is working fine. but currently receiving emails are showing like this.Example 36673283249829975 - Welcome to the site but I need change Example as PPS how can I do this? his is My VeryfyUser.php file in Mail folder

public function build()
    {
            $token = bin2hex(random_bytes(7));
    $token = hexdec($token);

       
        return $this->subject($token)->view('emails.verifyUser');
    }
28 May
3 months ago

Msoft left a reply on Not Working File Attachment With Laravel 5.7

@nomguy

Array
(
    [_token] => VRHfl8lh4SBfIXzrVZHEqTA6M0t6jqNxchEc3V5i
    [job] => Software Engineer
    [name] => msoft
    [exp] => 1
    [salary] => 65000
    [file] => Illuminate\Http\UploadedFile Object
        (
            [test:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 
            [originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => msoft.pdf
            [mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => application/pdf
            [error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0
            [hashName:protected] => 
            [pathName:SplFileInfo:private] => C:\wamp64\tmp\phpF8B0.tmp
            [fileName:SplFileInfo:private] => phpF8B0.tmp
        )

)

Msoft left a reply on Not Working File Attachment With Laravel 5.7

@nomguy now same error Call to a member function getClientOriginalName() on null

Msoft left a reply on Not Working File Attachment With Laravel 5.7

@nomguy output is this Illuminate\Http\UploadedFile Object ( [test:Symfony\Component\HttpFoundation\File\UploadedFile:private] => [originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => Wijayasinghalage Nalaka Samantha Wijayasinghe.pdf [mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => application/pdf [error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0 [hashName:protected] => [pathName:SplFileInfo:private] => C:\wamp64\tmp\php10FE.tmp [fileName:SplFileInfo:private] => php10FE.tmp )

Msoft left a reply on Not Working File Attachment With Laravel 5.7

@mvd did it but now got this error msg Call to a member function getClientOriginalName() on null

Msoft started a new conversation Not Working File Attachment With Laravel 5.7

I need attach some file and save to the table like .pdf and .jpeg using form submission in laravel 5.7 this is my file attach form group

<div class="form-group row">
<label for="inputPassword" class="col-sm-2 col-form-label">CV</label>
<div class="col-sm-10">
<input type="file" class="form-control-file" id="exampleFormControlFile1" name="file">
</div>
</div>

and controller is like this,

public function store(Request $request)
    {
                $datas = New Data;
        $datas->job = $request->input('job');
        $datas->name = $request->input('name');
        $datas->expe = $request->input('exp');
        $datas->salary = $request->input('salary');
        $datas->file = $request->input('file');
        $datas->save();
        return redirect()->back()->with('info','Your Job has been saved sucessfully');

    }

but when I submit form to save file following error message is occurred SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'file' cannot be null how can I fix this problem?

27 May
3 months ago

Msoft started a new conversation Rest API In Laravel

I am new to the Rest API. Please be kind enough let me know some good and simple but complete Rest API tutorials available on the internet.

Thank You.

18 May
4 months ago

Msoft started a new conversation 419 Sorry, Your Session Has Expired. Please Refresh And Try Again.

I am going to submit contact form data via the email as the following Controller,

public function contactUs()
   {
       return view('contactUs');
   }

   /**
    * Show the application dashboard.
    *
    * @return \Illuminate\Http\Response
    */
   public function contactUsPost(Request $request)
   {
       $this->validate($request, [
        'name' => 'required',
        'email' => 'required|email',
        'message' => 'required'
        ]);

       ContactUs::create($request->all());
        Mail::send('email',
        array(
           'name' => $request->get('name'),
           'email' => $request->get('email'),
           'user_message' => $request->get('message')
        ), function($message)
       {
       $message->from('[email protected]');
       $message->to('[email protected]', 'Admin')
       ->subject('Contact Form Query');
      });
   return back()->with('success', 'Thanks for contacting us!');
   }

and route is,

Route::get('contact-us', '[email protected]');
Route::post('contact-us',[
'as'=>'contactus.store',
'uses'=>'[email protected]'
]);

and contact form

<form action="{{route('contactus.store')}}" method="post">
<div class="form-group row">
    <label for="inputEmail3" class="col-sm-2 col-form-label">Name</label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="inputEmail3" name="name" placeholder="Name">
    </div>
  </div>
  
  <div class="form-group row">
    <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
    <div class="col-sm-10">
      <input type="email" class="form-control" id="inputEmail3" name="email" placeholder="Email">
    </div>
  </div>
  
   <div class="form-group">
  <label for="comment">Comment:</label>
  <textarea class="form-control" rows="5" name="message" id="comment"></textarea>
</div> 
  
  <div class="form-group row">
    <div class="col-sm-10">
      <button type="submit" class="btn btn-primary">Sign in</button>
    </div>
</form>
 

but when I click submit buttons I got following error massage ` 404

Sorry, the page you are looking for could not be found. ` how can fix this problem?

17 May
4 months ago

Msoft started a new conversation Differents Between Eloquent ORM And Query Builder?

there are two things in Laravel dealing with database as Eloquent ORM and Query Builder. I need to understand what is the differences between them?

10 May
4 months ago

Msoft left a reply on Not Working Show Function In Laravel 5.7

@vandan29 @wobbie @robstar please see my form to save data,

  <form action="{{url('studentcourceform')}}" method="post">

I think problem is here because see my error massage

Missing required parameters for [Route: studentcourcedata] [URI: studentcourcedata/{id}].

please see my store route

Route::post('studentcourceform','[email protected]');

Msoft left a reply on Not Working Show Function In Laravel 5.7

@sergiu17 now got this error message Missing required parameters for [Route: studentcourcedata] [URI: studentcourcedata/{id}].

Msoft started a new conversation Not Working Show Function In Laravel 5.7

I have table studentcource and store students cource data using studentcourceController store function here

public function store(Request $request)
    {
        $studentcource = New Studentcource;
        $studentcource->name = $request->input('name');
        $studentcource->address = $request->input('address');
        $studentcource->telephone = $request->input('telephone');
        $studentcource->cource = $request->input('cource');
        $studentcource->save();
        return redirect()->route('studentcourcedata');
        
        
    }

data storing is working fine. but I need redirect to studentcourcedata.blade.php after storing the data. show function is here in same controller,

public function show($id)
    {
        $studentcources = Studentcource::find($id);
        return view('studentcourcedata')->WithStudentcources($studentcources);
    }

and studentcourcedata.blade.php is like this

<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">Student Cource Data</div>

                <div class="card-body">
                    <table class="table">
                    <thered>
                     <tr>
                         <td>Id</td>
                         <td>Name</td>
                         <td>Address</td>
                         <td>Telephone</td>
                         <td>Cource</td>
                     </tr>
                    </thead>

                    <tbody>
                      @foreach ($studentcources as $studentcource)
                      <tr>
                        <td>{{$studentcource->id}}</td>
                        <td>{{$studentcource->name}}</td>
                        <td>{{$studentcource->address}}</td>
                        <td>{{$studentcource->telephone}}</td>
                        <td>{{$studentcource->cource}}</td>
                        

                      </tr>

                      @endforeach
                    </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

and my route is

Route::get('studentcourcedata','[email protected]')->name('studentcourcedata');

but I got following error here

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

how can I fix this problem?

25 Mar
5 months ago

Msoft started a new conversation How To Find Laravel Engineer Practical Test Documents?

How can I find out Laravel/PHP Engineer Practical Test Documentations? Please give me a good source.

Thanks.

20 Feb
7 months ago

Msoft left a reply on Object Oriented Programming In PHP

@jlrdw this video series not regarding with opp. it is about basic of the php. I need opp. it is not free in laracast

Msoft started a new conversation Object Oriented Programming In PHP

Please give me good resources (I mean link or something) about the object oriented programming in PHP (Please don't give me answer as search google tell me you already experience resource directly)

Thanks.

05 Feb
7 months ago

Msoft started a new conversation What Is Differentd Between Jquery And Ajax?

I am new to java scripts technologies. among them I cant understand what is different between jquery and Ajax. can you any body explain the difference or similarities between Jquery and Ajax?

Thanks.

31 Jan
7 months ago

Msoft started a new conversation Laravel Interview Questions?

I have an Interview as Software Developer in PHP and My PHP Framework is Laravel. so, Please link me some good resources you already know about Laravel Framework Interview Questions.

Thanks.

29 Jan
7 months ago

Msoft left a reply on How To Add Laravel Project On Github?

@ahsan it is paid tutorials.

28 Jan
7 months ago

Msoft left a reply on How To Develop Reservation System In Laravel?

Normaly there are lot of tutorials email verification after new use registration but I need like above system.

Msoft started a new conversation How To Develop Reservation System In Laravel?

HI, I am going to develop taxi reservation system using Laravel. my key functions are as following.

  1. user make reservation using form and submit the data.

2.after submit form data user should verify reservation using email link.

3.after click verify link those information should sent to admin email account.

above 3 functions are main features in my reservation application. actually I have no any experience earlier like this. and no any experience working with email. please if you can send me some tutorials link such as similar system or some steps to develop above system.

Thanks!

27 Jan
7 months ago

Msoft left a reply on How To Add Laravel Project On Github?

@ahsan OK give me little time after watch I will mark as best answer

Thanks

26 Jan
7 months ago

Msoft started a new conversation How To Add Laravel Project On Github?

I am new to github. I have Laravel project in my desktop and I need create new repository on github and upload Laravel file to github account. I have installed git to the computer. please give me simple and clear tutorials link how can I do this?

Thanks!

22 Jan
7 months ago

Msoft started a new conversation What Is Different Between Passport And JWT?

I am little bit new for api development. we met often passport and jwt with API. what is deference between passport and jwt?

19 Jan
8 months ago

Msoft started a new conversation What Is Object Oriented Programming In PHP

I am very new for oop in PHP. I need to learn oop in PHP. please let me know good learning resource.

Thanks.

18 Jan
8 months ago

Msoft left a reply on What Is The Main Purpose Of Developing REST API?

@douglasakula @audunru can you give me some good and simple rest api development tutorials links with Laravel?

Msoft started a new conversation What Is The Main Purpose Of Developing REST API?

what is the main purpose of developing REST API. please explain with some example?

16 Jan
8 months ago

Msoft started a new conversation Can I Customize Laravel Auth Login?

HI, I have some problem with laravel Auth command Login and Restration. I have default laravel login system using auth command. but I need login with nic number instead email. can I change username as nic with new nic column in user table?

20 Dec
9 months ago

Msoft started a new conversation How To Verify Online Reservation User And Inform Admin Via Email?

HI, currently I am developing online simple taxi booking system using Laravel. actually it is basic reservation system. it is functionality like following,

  1. users booking taxi over website

  2. then user receiving conformation email to users email

  3. then user logged with the system and confirmed by clicking on the link to verify user email

  4. after confirm admin receiving email including users booking details.

actually I do not use any database for these process. I like to handle those posses via emails? I allready have developed email verification system to register users. but in this app there are no need users registration. any way I have following questions here

  1. is this ok to develop without database

2.if you already know some tutorials same to this matter please send me those resources links also.

Thanks.

25 Nov
9 months ago

Msoft left a reply on Why Did Not Delete Table Records In Laravel 5?

@snapey if I use this type

<form action="{{route('clients.destroy',$client) }}" method="POST">
        @method('DELETE')
        @csrf
        <button class='btn btn-danger float-right btn-sm' type="submit" data-toggle="confirmation" >Delete Client</button>
    </form>

how can I manage route and Controller?

Msoft left a reply on Why Did Not Delete Table Records In Laravel 5?

@snapey please explain me what is the meaning of in your answer

clients.destroy

I think clients is view file name and destroy is function name am I correct?

Msoft left a reply on Why Did Not Delete Table Records In Laravel 5?

@snapey then, what should I do this fix? actually I am confuse with this? is this Personal scope problem?

Msoft left a reply on Why Did Not Delete Table Records In Laravel 5?

@robfrancken amazing I cant see [email protected] on php artisan route:list

Msoft left a reply on Why Did Not Delete Table Records In Laravel 5?

@robfrancken plase see my route

Route::get('myads/{id}/delete', [
    'uses' => '\App\Http\Controllers\[email protected]',
    
]);

Msoft started a new conversation Why Did Not Delete Table Records In Laravel 5?

working with Laravel and has table called as vehicles and I need delete table records who are logged with the app and related to create records with logged user, I am showing logged user records with following

vehicle model

public function scopePersonal($query)
{
     return $query->where('user_id', Auth::user()->id);

}

and VehcicleController

public function indexpersonel()
    {
         $vehicles = Vehicle::personal()->get();
        return view('vehicles.myads')->withVehicles($vehicles);
    }

and my ads delete buttons link

<td><a class="button is-outlined" href="/myads/{{$vehicule->id}}/delete" onclick="return confirm('Are you sure to want to delete this record?')" >Delete</a></td>

and vehicle controller delete function

public function deleteOneAd($id)
    {
        DB::table('vehicles')
            ->where('id', $id)

            ->delete();
        return redirect()->back();
}

but when I clicked delete button and accept javascripts popup it is not deleting vehicles table records. how can I fix this problem?

10 Nov
10 months ago

Msoft left a reply on Why Did Not Display Latest Updated Record From The Table In Laravel 5.6

@snapey did you mean this kind of scope,

public function scopeadvertise($query)
{
     return $query->Vehicle::with('uploads')
            ->paidAdverts()
            ->latest('updated_at');
      
}

Msoft left a reply on Why Did Not Display Latest Updated Record From The Table In Laravel 5.6

@snapey I did your comments on controller but still same results here. but I did not understand what you suggest on model in your answer. it is not clear for me...

Msoft started a new conversation Why Did Not Display Latest Updated Record From The Table In Laravel 5.6

Working with Laravel 5.6 and mysql in my app. I have two tables as vehicles and uploads, both Models relationship are as following, Vehicle Model,

public function uploads()
{
    return $this->hasMany(Upload::class);
} 

Upload Model,

public function vehicle()
{
    return $this->belongsTo(Vehicle::class);
}

and My vehicles table structure is as following,

id  name  adtype  created_at  updated_at
1   asc          1         2018-10-11  2018-10-11
2   lop          0         2018-11-09  2018-11-09
3   hyu         1         2018-11-10  2018-11-10

now I need to grab from vehicle table adtype == 1 and latest updated_at records, so I have following controller,

public function showad()
{
    $vehicles = Vehicle::with('uploads')
            ->orderBy('adtype')
            ->latest('updated_at');

    return view('vehicles.slider')->withVehicles($vehicles);
}

and My route is,

Route::get('vehicles.slider', [
    'uses' => '[email protected]',
    'as'   => 'vehicles.slider',
]);

and slider.blade.php is

@foreach( $vehicles->uploads as $upload)
    <img src="/images/{{ $upload->resized_name }}" height="150" width="200" >
@endforeach

and now I have include this slider blade file with show.blade.php file as following,

<div class="col-md-4">
@include('vehicles.slider')
</div>

show blade file url is like this,

http://localhost:8000/all-ads/23  // 23 is vehicle id

now my problem is here in my include slider blade file in show blade file. it is not showing latest updated vehicle table records. it is all ways showing existing show blade file include vehicle id records. as an example when I visit vehicle id 23 in show blade file my include file result is equel vehicle id 23. but I need latest updated vehicle id records in slider blade file. how can I do this? uploads table structure

id imagename vehicle_id
1  bgffg.png          1
2  jhjfhj.jpeg         2
3  jsdhj.png          1 
04 Nov
10 months ago

Msoft left a reply on Method Links Does Not Exist In Laravel 5.6 App?

@Cronix working without latest method but without latest it is not satisfy my business logic here....

03 Nov
10 months ago

Msoft left a reply on Method Links Does Not Exist In Laravel 5.6 App?

if it is work latest method my problem may solve

Msoft left a reply on Method Links Does Not Exist In Laravel 5.6 App?

@Cronix in your answer this one is working,

Vehicle::search($request->get('search'))->paginate(10);

but search results did not display according to the updated_at values.

but when used

Vehicle::search($request->get('search'))->latest('updated_at')->paginate(10);

it is got

Method latest does not exist.

Msoft left a reply on Method Links Does Not Exist In Laravel 5.6 App?

@Snapey now got

Method latest does not exist

error message

Msoft left a reply on Method Links Does Not Exist In Laravel 5.6 App?

@Snapey yes I have tried with following code,

if($request->has('search')){
            $vehicles = Vehicle::search($request->get('search'))
                        ->orderBy('adtype','DESC')

            ->latest('updated_at')
            ->paginate(10);
    });  //line 34
        }else{
            $vehicles = Vehicle::paginate(10);
        }
        return view('vehicles.index', compact('vehicles'));
    }

it occured

1/1) FatalErrorException

syntax error, unexpected ')'
in SearchController.php line 34

Msoft left a reply on Method Links Does Not Exist In Laravel 5.6 App?

@Cronix

use Searchable;
     protected $guarded = [];

    public function searchableAs()
    {
        return 'categoryname';
    }