Mubashar

Mubashar

Member Since 3 Years Ago

Experience Points 945
Experience Level 1

4,055 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 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.

14 Apr
3 years ago

Mubashar left a reply on How To Use Blade @stack Syntax ?

Use Script tag within that file where you want to use any extra script and your main layout load first.

Mubashar left a reply on Email Notifications

If you are Queueing a Mail message you have to reconfigure your queue. or maybe it is intentional.

Mubashar left a reply on Two Tables, One Model

It is not possible because it is against the laravel convention. You have to use seprate models for both tables.

Mubashar left a reply on How Can I Change Laravel's Built In Auth Function

First of all add this in your routes.php // Route::get('login','loginController@login'); // Route::get('auth/login', 'Auth\AuthController@getLogin'); // Route::post('auth/login', 'Auth\AuthController@postLogin'); // Route::get('auth/logout', 'Auth\AuthController@getLogout');

// Registration routes... // Route::get('auth/register', 'Auth\AuthController@getRegister'); // Route::post('auth/register', 'Auth\AuthController@postRegister'); OR Route::controllers(['auth' => 'Auth\AuthController', 'password'=>'Auth\PasswordController']); And if you write front end Correctly with url then visit this RedirectIfAuthenticated.php if ($this->auth->check()) { $task=\Auth::user()->role; if ($task=='poster') { return redirect('/home'); } else{ return redirect('/'); } } just replace the code within RedirectIfAuthenticated.php file

23 Jan
3 years ago

Mubashar left a reply on How To Get Checkedd Checkbox Values From View To Controller Only One Check Box. I Am Trying To Create Quiz Page For User To Take Quiz.

And Here is my Testcontroller store method public function store(Request $request) { dd($request->input('Question1')); $test=new Test(); $test->Question1=$request->input('Question1'); $test->save(); flash('Test save successfully'); return redirect()->back(); }

Mubashar started a new conversation How To Get Checkedd Checkbox Values From View To Controller Only One Check Box.

Here is my View:

  1. What does HTML stand for?



    Home Tool Markup Language
    Hyper Text Markup Language
    Hyperlinks and Text Markup Language
    None
</form>

And Here is my Testcontroller store method public function store(Request $request) { dd($request->input('Question1')); $test=new Test(); $test->Question1=$request->input('Question1'); $test->save(); flash('Test save successfully'); return redirect()->back(); }

19 Jan
3 years ago

Mubashar left a reply on File Validation Failing On Larger Files.

And don't forget to restart your xampp or wamp after changing your php.ini

Mubashar left a reply on Hi I Try To Upload Image In User Profile

i got it . i am using html and it works with enctype="multipart/form-data" . files='true' used with blade.

Mubashar left a reply on Hi I Try To Upload Image In User Profile

i am using html for form and here is my form

id }}{{ old('id') }}"> name}}@endif{{old('name')}}" placeholder="Enter Your Name" required pattern="^[a-zA-Z][a-zA-Z0-9-_\.]{4,20}$" title="5 to 20 characters"> {{--{!! Form::file('image') !!}--}}
17 Jan
3 years ago

Mubashar started a new conversation Hi I Try To Upload Image In User Profile

When i use $request->image it return image name with extention but when i user $request->file('image') it return null. I don't understand why? and in my form files='true'

04 Jan
3 years ago

Mubashar left a reply on How To Give Speciel Permissions Like 777 For Public/images

Here is my code $user=$data['name']; $imageName = $user . '_product.' . $user->file('image')->getClientOriginalExtension(); $imageCompletePath = 'public/images/'. $imageName ; $data->file('image')->move( base_path() . '/public/images/', $imageName);

        $user->update(array('image' => $imageCompletePath));

And is gives me this exception maybe because of special permissions FatalErrorException in AuthController.php line 149: Call to a member function file() on string

Mubashar left a reply on How To Give Speciel Permissions Like 777 For Public/images

yes but most people working on linux etc

Mubashar started a new conversation How To Give Speciel Permissions Like 777 For Public/images

i am working on windows

31 Dec
3 years ago

Mubashar left a reply on How I Can Solve This Expected Response Code 350 But Got Code "530", With Message "530-5.5.1 Authentication Required

I am using Xampp server. After setting some configuration i get this Expected response code 350 but got code "250", with message "250 2.1.0 OK q82sm50784583pfq.1 - gsmtp Here is my .env MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=mymail MAIL_PASSWORD=mypassword MAIL_ENCRYPTION=tls and here is my config\mail.php

'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.gmail.com'),
'port' => env('MAIL_PORT', 587),

'from' => ['address' => 'mubeshier.hameed@gmail.com', 'name' => 'Welcom to Indus'],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME','myemail@gmail.com'),
'password' => env('MAIL_PASSWORD','mypassword),
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,

];

Mubashar started a new conversation How I Can Solve This Expected Response Code 350 But Got Code "530", With Message "530-5.5.1 Authentication Required

i try send password resent link to the user but i get this Exception.

29 Dec
3 years ago

Mubashar left a reply on Where To Put Code Used By Several Projects.

Create new folder name traits in app directory for every project there is no other solution yet.

Mubashar left a reply on Composer Gives Me An Error

use composer update

Mubashar left a reply on Php Artisan Returns SQLSTATE[HY000] [2002] No Such File Or Directory

just go to the config folder and then database.php and 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'laraveltest2'),//here your database name 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, ], Actually Laravel need database connection and after that your composer will work. If you install composer globally than it should work.

27 Dec
3 years ago

Mubashar started a new conversation How I Get Image Form User Using Auth Controller At The Time Of Registration

I do this in the following way and try to upload image but it not worked. Here is my AuthController code: $user= User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'nic'=>$data['nic'], 'contactNo'=>$data['contactNo'], 'CreditCardNo'=>$data['CreditCardNo'], 'country'=>$data['country'], 'role'=>$data['role'], ]); if(Input::file('image')){ $user=$data['id']; $imageName = $user->id . '_product.' . $user->file('image')->getClientOriginalExtension(); $imageCompletePath = '/images/'. $imageName ;

        $data->file('image')->move(
            base_path() . '/public/images/', $imageName);

        $user->update(array('image' => $imageCompletePath));

    }
    return $user; 

Mubashar left a reply on How To Add Primary Picture Per User Account?

I am doing this in AuthController and try to save image in Auth controller , it stores the data in DB but still image path is not stored in database. protected function create(array $data) { if($this->captchaCheck() == false) { flash('Wrong Captcha'); return redirect()->back() ->withErrors(['Wrong Captcha']) ->withInput(); } $user= User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'nic'=>$data['nic'], 'contactNo'=>$data['contactNo'], 'CreditCardNo'=>$data['CreditCardNo'], 'country'=>$data['country'], 'role'=>$data['role'],

        ]);
    $imageName = $user->id . '_product.' .
        $user->file('image')->getClientOriginalExtension();
    $imageCompletePath = '/images/'. $imageName ;

    $data->file('image')->move(
        base_path() . '/public/images/', $imageName);

    $user->update(array('image' => $imageCompletePath));
    return $user;
26 Dec
3 years ago

Mubashar started a new conversation TelegramSDKException In GuzzleHttpClient.php Line 97: CURL Error 60: SSL Certificate Problem: Self Signed Certificate In Certificate Chain (see Http://curl.haxx.se/libcurl/c/libcurl-errors.html)

i try to get chat id but i am stuck here how i can solve this? Here is my method where i try to get chat id

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Input;

use Irazasyed\Telegram\Telegram; class TelegramController extends Controller { protected $telegram;

public function __construct( Telegram $telegram )
{
    $this->telegram = $telegram;
}

public function getUpdates()
{
    $updates = $this->telegram->getUpdates();
    dd($updates);
}
20 Dec
3 years ago

Mubashar started a new conversation How Do I Change Storage Permissions And What Is The Commands? And How I Set Virtual Host Croppic.dev?

i use this command but it did not work. chmod -R 777 storage chmod is not recongnize

Mubashar left a reply on Class 'e ' Not Found

yes i write e::get() instead of Route::get()

17 Dec
3 years ago

Mubashar left a reply on [Symfony\Component\Debug\Exception\FatalErrorException] Class 'e' Not Found

i found it. Actually i am using e::get() in my route.php file

Mubashar started a new conversation [Symfony\Component\Debug\Exception\FatalErrorException] Class 'e' Not Found

When i try to run any command on composer cmd it gives me the following error [Symfony\Component\Debug\Exception\FatalErrorException] Class 'e' not found

Mubashar started a new conversation Class 'e ' Not Found

When i try to run any command on composer cmd it gives me following error [Symfony\Component\Debug\Exception\FatalErrorException] Class 'e' not found

06 Dec
3 years ago

Mubashar left a reply on Relationship Method Must Return An Object Of Type Illuminate\Database\Eloquent\Relations\Relation

Here is my home.blade.php page.

@extends('app')

@section('title') {{$title}} @endsection

@section('content')

@if ( !$posts->count() ) There is no post till now. Login and write a new post now!!! @else

@foreach( $posts as $post )

{{ $post->title }} @if(!Auth::guest() && ($post->author_id == Auth::user()->id || Auth::user()->is_admin())) @if($post->active == '1') Edit Post @else Edit Draft @endif @endif

{{ $post->created_at->format('M d,Y \a\t h:i a') }} By {{ $post->author->name }}

    </div>
    <div class="list-group-item">
        <article>
            {!! str_limit($post->body, $limit = 1500, $end = '....... <a href='.url("/".$post->slug).'>Read More</a>') !!}
        </article>
    </div>
</div>
@endforeach
{!! $posts->render() !!}
@endif

@endsection

Mubashar left a reply on Relationship Method Must Return An Object Of Type Illuminate\Database\Eloquent\Relations\Relation

I am sure about all this happen in my index method because when i dd('some text') it works fine. Can any one tell how this relationship works and where to assign and access the foreign keys? i am new to Laravel. I also spend some time on Policies and abilities in laravel latest version for understaning this new feature.

Mubashar left a reply on Relationship Method Must Return An Object Of Type Illuminate\Database\Eloquent\Relations\Relation

My User Model : public function posts() { return $this->hasMany('App\Posts','author_id'); }

// user has many comments
public function comments()
{
    return $this->hasMany('App\Comments','from_user');
}

public function can_post()
{
    $role = $this->role;
    if($role == 'poster' || $role == 'admin')
    {
        return true;
    }
    return false;
}
public function can_bidd()
{
    $role = $this->role;
    if($role == 'bidder' || $role == 'admin')
    {
        return true;
    }
    return false;
}
public function is_admin()
{
    $role = $this->role;
    if($role == 'admin')
    {
        return true;
    }
    return false;
}

Mubashar left a reply on Relationship Method Must Return An Object Of Type Illuminate\Database\Eloquent\Relations\Relation

Here is my post Model class Posts extends Model { //posts table in database protected $guarded = []; protected $fillable=[ 'title', 'category', 'cost', 'skills', 'paymentmethod', 'duration', 'workload', 'experiencelevel', 'hires', 'body', 'slug', 'author_id', 'active' ];

public function comments()
{
    return $this->hasMany('App\Comments','on_post');
}

public function author()
{
    return $this->belongsTo('App\User','author_id');
}

}

05 Dec
3 years ago

Mubashar started a new conversation Relationship Method Must Return An Object Of Type Illuminate\Database\Eloquent\Relations\Relation

I am getting error here but i dont know why? public function index() { //dd('solution'); $posts=Posts::where('active','1') ->orderBy('created_at','desc') ->paginate(5); $title = 'Latest Posts'; return view('home')->withPosts($posts)->withTitle($title);

}
10 Nov
3 years ago

Mubashar left a reply on Change Forgot Password URL

App\http\middleware\RedirecIfAuthenticated.php change /home to '/ ' or u need to give here

24 Oct
3 years ago

Mubashar left a reply on Can We Use Bootstrap In Laravel 5.0

I am using bootstrap model form and using boostrap validator to validate it. but after wasting my time i finally use html 5 attributes to validate form.

Mubashar left a reply on Can We Use Bootstrap In Laravel 5.0

Actually bootstrap validation not working properly for my form not facing any error. if you have bootstrapvalidator.min.js and bootstrapvalidator.min.css please share them with me. on mubeshier.hameed@gmial.com

Mubashar left a reply on Can We Use Bootstrap In Laravel 5.0

I am usign bootstrapvalidator.min.js and bootstrapvalidator.min.css for validation of forms but it is not working.

19 Oct
3 years ago

Mubashar started a new conversation Can We Use Bootstrap In Laravel 5.0

i am getting problem in bootstrap validation in laravel.