mustafaabdujalil

mustafaabdujalil

alexandria

Member Since 2 Years Ago

Experience Points 5,550
Experience
Level
Lessons Completed 0
Lessons
Completed
Best Reply Awards 2
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.

03 Jan
1 week ago

mustafaabdujalil left a reply on Yajra

The solution is

go to your projects bootstrap->cache->config.php remove the provider & aliases entries from the cached array manually.

then

php artisan config:clear

mustafaabdujalil started a new conversation Yajra

I installed Yajra datatable buttons plugin then i remove it from composer.json and app.php and remove created folder and do composer update but when i run server i get this error

Class 'Yajra\DataTables\ButtonsServiceProvider' not found

any help ?

thanks

30 Dec
2 weeks ago

mustafaabdujalil left a reply on Desktop Icon

@SERGIU17 - you misunderstand me

mustafaabdujalil started a new conversation Laravel

how can i create desktop icon for my app in laravel and make user download it ??

27 Dec
2 weeks ago

mustafaabdujalil started a new conversation APIs Auth

how can i use passport ot JWT APIs Auth with members table not users table ??

21 Nov
1 month ago

mustafaabdujalil left a reply on Large Data

@AHMEDDABAK - جزاك الله كل خير متشكر جدا

mustafaabdujalil left a reply on Large Data

@ahmeddabak Done check my code thanks

mustafaabdujalil started a new conversation Large Data

I want to update value of attribute for huge number of rows because i need avoid serve be slow or occur any error i used chunk but no effect ?!! any help

07 Oct
3 months ago

mustafaabdujalil started a new conversation Grouped By

I have table that has id , product_id , admin_id, comment ,created_at,updated_at the idea that each admin can write comment on any product if many admin wirte comment on the same product how can i get last one

example id , product_id , admin_id, comment ,created_at,updated_at 1, 2,1,hi,2018-09-30 20:01:53,2018-09-30 20:01:53 2, 2,3,hello,2018-10-02 15:01:53,2018-10-3 23:01:53

how can i get last row that has last update

27 Sep
3 months ago

mustafaabdujalil started a new conversation Pagination

i want to get specific data from returned pagination data Example : i want to select name from product and name from pharmacy_product_size only i dont need any other data?? how can i do that


{
    "data": {
        "current_page": 2,
        "data": [
            {
                "id": 21,
                "pharmacy_id": 1,
                "product_id": 12,
                "is_approved": -1,
                "comment": null,
                "created_at": null,
                "updated_at": null,
                "product": {
                    "id": 12,
                    "name": "zaz",
                    "name_ar": "zaa",
                    "description": "zaaz",
                    "description_ar": "zazaza",
                    "category_id": 3,
                    "featured_img": "product-1537804598.png",
                    "status": null,
                    "brand_name": null,
                    "created_at": "2018-09-24 15:56:38",
                    "updated_at": "2018-09-24 15:56:38"
                },
                "pharmacy_product_size": {
                    "id": 16,
                    "pharmacy_product_id": 21,
                    "size_id": 1,
                    "price": 10,
                    "quantity": 12,
                    "sold": 0,
                    "available_stock": 12,
                    "low_stock": 5,
                    "out_stock": 0,
                    "status": 0,
                    "created_at": null,
                    "updated_at": null
                }
            }
        ],
        "first_page_url": "http://localhost:8000/api/pharmacy/1/category/3/products?page=1",
        "from": 2,
        "last_page": 20,
        "last_page_url": "http://localhost:8000/api/pharmacy/1/category/3/products?page=20",
        "next_page_url": "http://localhost:8000/api/pharmacy/1/category/3/products?page=3",
        "path": "http://localhost:8000/api/pharmacy/1/category/3/products",
        "per_page": 1,
        "prev_page_url": "http://localhost:8000/api/pharmacy/1/category/3/products?page=1",
        "to": 2,
        "total": 20
    },
    "status": "success"
}


13 Sep
4 months ago

mustafaabdujalil started a new conversation .env File

i want store some variables in .env file like admin_id i use env('key','value') but when i edit variable in .env file dont update and returnold value how can i do that??

12 Sep
4 months ago

mustafaabdujalil left a reply on Apis

@cmdobueno i mean how can i do that ?!!! this place for discuss not for advice ;)

mustafaabdujalil started a new conversation Apis

using pagination in api request ex : send users ten per page

thanks

10 Sep
4 months ago

mustafaabdujalil started a new conversation Pusher

i want to push web notification so i use pusher and set everything as i show my view


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Demo Application</title>
  </head>
  <body>

    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="//js.pusher.com/3.1/pusher.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

    <script type="text/javascript">

      // if (notificationsCount <= 0) {
      //   notificationsWrapper.hide();
      // }

      // Enable pusher logging - don't include this in production
      // Pusher.logToConsole = true;

      var pusher = new Pusher('set my app key', {
          cluster: 'eu',
          forceTLS: true
        });


      // Subscribe to the channel we specified in our Laravel Event
      var channel = pusher.subscribe('status-liked');

      // Bind a function to a Event (the full Laravel class)
     console.log(channel.bind('App\Events\StatusLiked', function(data) {
          alert(data.message);
        }));

    </script>
  </body>
</html>

my event

<?php

namespace App\Events;

use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

class StatusLiked implements ShouldBroadcast
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public $username;

    public $message;

    /**
     * Create a new event instance.
     *
     * @return void
     */
    public function __construct($username)
    {
        $this->username = $username;
        $this->message  = "{$username} liked your status";
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return Channel|array
     */
    public function broadcastOn()
    {
        return ['status-liked'];
    }
}

my routes

<?php
Route::get('/', function () {
    return view('welcome');
});
Route::get('test', function () {
    event(new App\Events\StatusLiked('Someone'));
    return "Event has been sent!";
});
08 Sep
4 months ago

mustafaabdujalil started a new conversation Firebase Real Time Database

how can i connect my database on server with google database direct instead of export json file ??

mustafaabdujalil started a new conversation Socket Io

how can i push real time notifications with socket io in laravel ?

06 Sep
4 months ago

mustafaabdujalil started a new conversation Real Time Notifications

In Firebase, should I use a real-time DB or cloud messaging for an information web page updated in real time? I hope attache link or video for that

04 Sep
4 months ago

mustafaabdujalil left a reply on Yajra

what ?? @jlrdw

mustafaabdujalil started a new conversation Yajra

i want to add checkbox column that can select only one row or all rows and do actions for it how can i add that ??

29 Aug
4 months ago

mustafaabdujalil started a new conversation Reset Password

i want to reset password and send reset email link to emails without using make:auth any help ?

thanks

mustafaabdujalil started a new conversation Reset Password

i try to send reset password link to email on local should i use server to send email ?

thanks

16 May
8 months ago

mustafaabdujalil started a new conversation RocketShipIT

i add rocketshipit to composer.json autoload then do dump-autoload but i dont know what should i do after this steps ?? any help

30 Mar
9 months ago

mustafaabdujalil started a new conversation Identify Multi Model With Same Line

how can i use use App{ LocationAddress,Location,PackageUpdate,Package,ApplicationSetting,Companies,UserInvitation,AdvancedFeature,AdvancedFeaturesPerCompany,AdvancedFeature1CustomStatusPerCompany,TagsPaymentBalance, AdvancedFeatures3SettingsPerCompany };

28 Dec
1 year ago

mustafaabdujalil started a new conversation Public APIs

how can i make auth for user in public APIs , i use JWT in private APIs ?

mustafaabdujalil started a new conversation Composer Update

I published my laravel app on cpanel and i want to install package on it by run command or composer update how can i do that but i cant access ssh of cpanel ??

thanks in advanced

26 Dec
1 year ago

mustafaabdujalil started a new conversation Error Page

How can redirect user to home page if there is error in insert or and error with database instead of display red page with error name i want redirect user to home page ? thanks

20 Dec
1 year ago

mustafaabdujalil started a new conversation Public APIs

What is public APIs and How can i generate it in laravel any article or simple examples ?

thank you in advanced

19 Dec
1 year ago

mustafaabdujalil left a reply on Cron Job

thank you for your efforts my friend

mustafaabdujalil left a reply on Cron Job

Command file


<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\ApplicationSetting;
use App\TagsPaymentBalance;
use App\User;
use Carbon\Carbon;

class addBalanceMonthly extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'addBalanceMonthly:addBalance';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Add Balance for users monthly';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        //
        $users = User::where('user_type',3)->get();
        $amount = ApplicationSetting::first();
        
        foreach($users as $user){
            
            TagsPaymentBalance::create([
                 'user_id' => $user->id,
                 'date_added' => Carbon::now('America/New_York'),
                 'total_tags_added' =>$amount->monthly_points,
                 'current_tags_left' =>$amount->monthly_points,
                 'expiry_date' => date('Y-m-d h:i', strtotime("+1 months", strtotime(Carbon::now('America/New_York')))),
                 'entry_type' =>1,
             ]);            
        
            
        }

        
    }
}

?>



mustafaabdujalil started a new conversation Cron Job

How can i run cron job on cpanel in my laravel app ? thanks in advanced

18 Dec
1 year ago

mustafaabdujalil started a new conversation Public APIs

What is public APIs and How can i generate it in laravel any article or simple examples ?

thank you in advanced

16 Dec
1 year ago

mustafaabdujalil left a reply on Convert Json To Array

yes i used it but still return first answer

mustafaabdujalil started a new conversation Convert Json To Array

laravel return array of objects how can i convert this array to array of arrays ? this is example


{  
   "data":[  
      {  
         "id":93,
         "created_at":"2017-12-12 07:47:34"
      },
      {  
         "id":78,
         "created_at":"2017-12-11 06:51:51"
      },
   ]
}

to 

{  
   "data":[  
      [  
         "id":93,
         "created_at":"2017-12-12 07:47:34"
      ],
      [  
         "id":78,
         "created_at":"2017-12-11 06:51:51"
      ],
   ]
}

mustafaabdujalil started a new conversation Jquery Datatable With Laravel

How can i use server side to display data in jquery datatable due to i have i a lot of data in database ?!

15 Dec
1 year ago

mustafaabdujalil started a new conversation Install Pacakge In Laravel App On Cpanel

I have laravel app on cpanel How can i install pacakge on my app by composer ?!!!

10 Dec
1 year ago

mustafaabdujalil left a reply on IDE For Laravel

thanks for all :)

mustafaabdujalil started a new conversation IDE For Laravel

what is the best IDE for laravel except PHPStorm because it's paid ?

if sublime, netbeans and atom has package for laravel to help me in coding as phpstorm

thanks in advanced

06 Dec
1 year ago

mustafaabdujalil left a reply on Update Database

i know this solution but i thought if there is another solution but overall thank you :) @Nash

mustafaabdujalil started a new conversation Update Database

how can i update some tables in database with each request for user ?

example : if i want update last seen for user with each request he do it

thanks

03 Dec
1 year ago

mustafaabdujalil started a new conversation Swagger With Laravel

How can i use Swagger with laravel ?!!

any tutorial or article ?

Thanks

28 Nov
1 year ago
27 Nov
1 year ago

mustafaabdujalil started a new conversation Remove Duplicated Rows

I have more than row with the same data but different in id (because it's unique) Example : columns : id name age address first row : 1 ahmed 22 ba7ry second row : 2 ahmed 22 ba7ry

how get only first row from duplicated ???

thanks

22 Nov
1 year ago

mustafaabdujalil started a new conversation Distinct Duplicated

How distinct the query from get the duplicated data ? example : if i have two rows with the same data in all fields except id exactly is different

thanks

16 Nov
1 year ago

mustafaabdujalil started a new conversation Redirect To Another Url Or Website

Redirect to another url or website ?!!

13 Nov
1 year ago

mustafaabdujalil started a new conversation Voyager

How can i use voyager with existing database that has table users with different fields ??

thanks

07 Nov
1 year ago

mustafaabdujalil started a new conversation Laravel Validation

I create ajax request and do laravel validation for parameters of this request how can i return validation errors to ajax as a json response ? Thanks