tallaljamshed

Member Since 1 Year Ago

Experience Points
1,460
Total
Experience

3,540 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 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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.

  • Community Pillar

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

Level 1
1,460 XP
Dec
23
4 weeks ago
Activity icon

Started a new Conversation Array_keys() Expects Parameter 1 To Be Array, Null Given

Im getting this error when changing stripe subscription, and cashier is being used here. Now I guess this error is not with cashier or strip but here is the line with error.(within StripeObject.php)

$removed = new Util\Set(\array_diff(\array_keys($this->_values), \array_keys($values)));

although i tested this with dd() and it displays data fine. so i have no idea why it would throw an error outside dd(). if composer.json file helps ?

{
    "require": {
        "php": "^7.2",
        "barryvdh/laravel-debugbar": "*",
        "barryvdh/laravel-dompdf": "*",
        "binarytorch/larecipe": "^2.2",
        "brotzka/laravel-dotenv-editor": "^2.1",
        "consoletvs/charts": "6.*",
        "cviebrock/eloquent-sluggable": "*",
        "fideloper/proxy": "^4.0",
        "guzzlehttp/guzzle": "*",
        "kalnoy/nestedset": "5.0",
        "kingflamez/laravelrave": "^2.0",
        "kris/laravel-form-builder": "1.*",
        "laravel/cashier": "^9.0",
        "laravel/framework": "^6.0",
        "laravel/passport": "^7.0",
        "laravel/telescope": "^2.0",
        "laravel/tinker": "^1.0",
        "laravelcollective/html": "^6.1",
        "maatwebsite/excel": "^3.1.19",
        "paypal/rest-api-sdk-php": "^1.14",
        "pragmarx/countries": "*",
        "sarfraznawaz2005/visitlog": "^1.2",
        "unicodeveloper/laravel-paystack": "^1.0",
        "unisharp/laravel-filemanager": "^1.8"
    },
    "require-dev": {
        "facade/ignition": "^1.4",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "~1.0",
        "nunomaduro/collision": "^3.0",
        "phpunit/phpunit": "^8.0"
    },

PS: what r these "" for in \array_keys($values) ?

Dec
19
1 month ago
Activity icon

Started a new Conversation Cashier/stripe Subscription Not Adding Complete Data In DB

I'm trying to create a subscription with cashier. it was working fine yesterday but now there's a problem and i don't know what changed. the problem is subscription is being created on stripe and correct data is returned but not all data is added in subscriptions table. The problem is in this function.

// dd($this->name,$subscription->id,$this->plan,$this->quantity,$trialEndsAt);
        dd('builder',$this->owner->subscriptions()->create([
            'name' => $this->name,
            'stripe_id' => $subscription->id,
            'stripe_plan' => $this->plan,
            'quantity' => $this->quantity,
            'trial_ends_at' => $trialEndsAt,
            'ends_at' => null,
        ]));

you see the above commented DD() shows all data but after create(); it only shows

#attributes: array:4 [▼
    "user_id" => 18
    "updated_at" => "2020-12-19 12:24:04"
    "created_at" => "2020-12-19 12:24:04"
    "id" => 46
  ]

these 4 columns. now what other thing changed was this was also happening in users table when registering a new user and i solved that with

public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
    }

i think it stoped working after this. i tried removing it , also adding it to subscriptions model but nothing works. HEELLLPPPP... EDIT: I noticed that this create function is working but just not adding my given values.I did include fillable array and as I said it was working before.

Dec
14
1 month ago
Activity icon

Replied to $fillable And Create() Not Working

this worked for me but what it means ? never had to do this before

Dec
06
1 month ago
Activity icon

Replied to Slow Website Only On Route Middleware

then why it works fine when middleware is in controller constructor ? ram is not used then ? BTW i have 16gb with 40% in use.

Activity icon

Started a new Conversation Stripe Customer->sources->create Error

I have stripe integrated in a project. when i try to pay it just gives me an error "Call to a member function create() on null" on line 414 and this is the line "$card = $customer->sources->create(['source' => $token]);" now i saw the code and on searching it turns out stripe does not return sources with customer after latest update. they say you have to put "expand" when sending a request, now i dont know how it works in vendor files and dont wanna mess with anything. so if someone could provide a proper fix ? laravel => 6.0 cashier =>9.0

Dec
05
1 month ago
Activity icon

Started a new Conversation Slow Website Only On Route Middleware

I just noticed if I put this middleware on route group, the website loads fine but after loading it gets stuck for a few seconds like nothing is clickable or scrolling then works after a while but on every menu/sidebar/navbar button click or new page, it gets stuck again its weird. But whats more weird is that if i put same middleware on controller constructors it works perfectly and dont get stuck. Now i saw the loading time it was around 700ms booting and 500ms - 600ms application on debugbar. Any solutions for this? dont know whats happening in the background making the client side stuck. also if its some java script problem then it shouldn't have any effect by middleware placement .

Dec
04
1 month ago
Activity icon

Awarded Best Reply on Implementing Flutter API

alright i got it working only change form_params to json and no public_key required only tx_ref , amount and redirect_url.

Activity icon

Replied to Implementing Flutter API

alright i got it working only change form_params to json and no public_key required only tx_ref , amount and redirect_url.

Activity icon

Started a new Conversation Implementing Flutter API

Hi, I'm trying to implement this "https://api.flutterwave.com/v3/payments/" api in laravel. what i want is to send some data to this api and get a url in response so I can send that url back to the ajax request on client side. client side opens that url in a new tab and pays whatever amount was set in controller now how can i implement that. This is my code so far.

$amount = some amount;
    $referenceno = some ref number;
    $currency = "NGN";
    $redirect_url = some url;
    $authorization = 'Bearer'." ".$this->fsk;
    $data = [
        'amount' => $amount,
        'email' => email,
        'metadata' => json_encode($array = [
            'contest_id'=>contest_id , 
            'contestent_id'=>contestant_id,
            'no_of_votes'=>no_of_votes
        ]),
        'reference' => $referenceno,
    ];

    $client = new \GuzzleHttp\Client();
    $url = "https://api.flutterwave.com/v3/payments/";

    $request = $client->post($url,  [
        'headers' => [
            'Content-Type' => 'application/json',
            'Authorization' => $authorization,
        ],
        'form_params' => [
                'public_key'=>$this->fpk,
                "tx_ref"=>$referenceno,
                "amount"=>$amount,
                "currency"=>$currency,
                "redirect_url"=>$redirect_url,
                'customer'=>[
                    'email' => email,
                    'phone_number'=>some number,
                    'name'=>'voter',
                ],
                "meta"=>$data,
                'customizations' =>[
                    'title' => title,
                    'description'  => 'Pay to vote',
                ]
        ]
    ]);

    $response = $request->send();
    dd($response);

this returns me the error

Server error: `POST https://api.flutterwave.com/v3/payments/` resulted in a `500 Internal Server Error` response:↵{"error_id":"ERRNO738287451T1607106126413","message":"Application error. Please contact support","code":"app_error"}↵"

which is not very helpful so if someone can guide me. also i dont want to send payment method so customer can just chose one from payment page.

Nov
30
1 month ago
Activity icon

Replied to File Not Uploading

ok turned out error:6

+files: Symfony\Component\HttpFoundation\FileBag {#48 ▼
    #parameters: array:1 [▼
      "file_name" => Symfony\Component\HttpFoundation\File\UploadedFile {#33 ▼
        -test: false
        -originalName: "testing document (10).docx"
        -mimeType: "application/octet-stream"
        -error: 6
        path: ""
        filename: ""
        basename: ""
        pathname: ""
        extension: ""
        realPath: "/home/uaarclassuaaredu/public_html/public"
        aTime: 1970-01-01 05:00:00
        mTime: 1970-01-01 05:00:00
        cTime: 1970-01-01 05:00:00
        inode: false
        size: false
        perms: 00
        owner: false
        group: false
        type: false
        writable: false
        readable: false
        executable: false
        file: false
        dir: false
        link: false
      }
    ]
  }

which on google search turned out to be "UPLOAD_ERR_NO_TMP_DIR"

Activity icon

Awarded Best Reply on Laravel MS Office Files Upload Validation

OK Problem solved with interesting findings.

  1. Removing Spaces between commas. was not always an issue , in some files it helps but in others it dosn't .... so in general no spaces is a good idea.

  2. Empty files are not validated dont know if it was an obvious thing but ,, first time for me lol ,, . ONLY empty PDF works.

Activity icon

Replied to File Not Uploading

oh sorry I failed to mention size is 12 kb . rights are ok . As I said it's working fine mostly . just for few files this happens sometimes so i need better understanding of raw exceptions.

Activity icon

Started a new Conversation File Not Uploading

im trying to upload word, pdf, excel files. project is working fine for 1 year now with almost all files with few exceptions. sometimes some files simply refuse to upload. giving me only message from request validation ... " The file failed to upload. " Now how can I find the reason for this. A direct answer will help too but if somebody can just tell me how can i see raw exceptions on request validation instead of fancy error messages.

Nov
28
1 month ago
Activity icon

Replied to Customer Payment Verification And Client Side Change

okey this looks something close and im thinking of the modifications it needs to be implemented then ill reply.

Activity icon

Started a new Conversation Customer Payment Verification And Client Side Change

here's the scenario..

  1. A customer pushes a button to pay through paypal or paystack or flutter
  2. client side ajax sends request to server telling payment method .. (meanwhile waiting sign is shown) .. server decides amount and currency and returns back a link of payment gateway to ajax.
  3. (waiting sign is removed on ajax complete).. ajax opens that link on a new page and customer can pay.
  4. payment gateway returns call back to server telling successful payment. now how can i send it back to client that payment is successful and update some data on client view. also is this workflow okey. or can anything be improved. PS.. one solution i was thinking. another ajax request after first one that will wait on server side for a callback of payment gateway. but how can i implement that ? i mean the waiting part? i was testing with this function but its stuck somewhere
public function waitForPayment()
{
	$count = 0;
	$status = "not-paid";
        while (true){
            if(Session::get('paystackpaid') || $count>30){
		$status = "paid";
                break;
            }else{
                sleep(2);
                $count++;
            }
        }
        Session::forget('paystackpaid');
        return $status;
}

when payment starts, a session paystackpaid is set to false. and on callback its set to true.

Oct
24
2 months ago
Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: HEAD.

  1. win10 , xampp 7.4.11(latest), laravel latest
  2. (composer create-project laravel/laravel project)
  3. project is installed in htdocs. as C:/xampp/htdocs/project
  4. run as localhost/project/public. but as i said it was working fine a while ago then this error so it only happens some times. And now im working with php artisan serve, it works this way . @sinnbeck
Activity icon

Replied to The GET Method Is Not Supported For This Route. Supported Methods: HEAD.

yes its like laravelproject/public , but ive always done that to make it quick , i know php artisan serve and making virtual host . but this is quick and it always worked before @sinnbeck

Activity icon

Started a new Conversation The GET Method Is Not Supported For This Route. Supported Methods: HEAD.

Ive been experiencing this for some time now in different projects. but mostly without even changing anything. just on the first route '/', and recently created a new laravel 8 project with jetstream and facing same issue. i fixed it once before i guess with php artisan route:cache but not working anymore. other things i tried are. php artisan optimize composer dump-autoload closing everything and opening project again. cant think of anything else. As I said its a fresh project nothing changed yet . just default route. pls help

Sep
01
4 months ago
Activity icon

Replied to Copying Laravel Project From One Server To Another (shared Hosting)

alright got it working . just need to delete the files in "bootstrap/config/"..... thanks everyone :)

Activity icon

Started a new Conversation Copying Laravel Project From One Server To Another (shared Hosting)

hi i have this laravel project perfectly working at one hosting and i need to copy it to another. i already copied full project which is not that big BUT its not working. i have done this before but i dont remember what stuff to change to make it work . now the problem is this

UnexpectedValueException
There is no existing directory at "/home/uaarclassuaaredu/public_html/storage/logs" and its not buildable: Permission denied

notice the directory "uaarclassuaaredu" this is the one from previous project . so it should not be showing on this new domain.

im using shared hosting (cpanel). no composer no ssh. need a solution ASAP . THANKS

PS: i didnt copied the storage folder cause theres alot of data in it so on this new domain i just created this folder

Aug
17
5 months ago
Activity icon

Started a new Conversation Ebay Getinventoryitem Not Returning Any Item

Hi im working with ebay API's and i see some problems in returning data,

  1. using getinventoryitem api returns
"{"total":0,"size":0}"

while getinventoryitem BY SKU works fine i get all items that i search for. and the same goes for bulkgetinventoryitems all SKU's are returned fine.

Aug
10
5 months ago
Activity icon

Started a new Conversation Using OAuth With Laravel- Best Practices

I want to integrate ebay APIs with my inventory system. but this is a general question. What is the best practice to get access token by oAuth every time before using APIs.

1.) I was thinking of making a helper function to get (access token and and refresh token) and save with user credentials. so on a next api call i will just get the token from user table before its expiry.

2.) If access token is expired then I will use refresh token.

or use step 1 again if refresh token is also expired.

DONT WANNA USE ANY OTHER PACKAGE . KEEPING IT SIMPLE AND EASY