mustafaabdujalil

mustafaabdujalil

Member Since 3 Years Ago

alexandria

Experience Points
6,940
Total
Experience

3,060 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
1
Lessons
Completed
Best Reply Awards
2
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.

Level 2
6,940 XP
Mar
31
1 day ago
Activity icon

Awarded Best Reply on Custom Pagination

I solved it by this code

   public static function customPaginate($data)
    {
        //Get current page form url e.g. &page=6
        $currentPage = LengthAwarePaginator::resolveCurrentPage();

        //Create a new Laravel collection from the array data
        $collection = new Collection($data);

        //Define how many items we want to be visible in each page
        $per_page = Config::PAGINATIONCOUNT;

        //Slice the collection to get the items to display in current page
        $currentPageResults = $collection->slice(($currentPage - 1) * $per_page, $per_page)->values();

        //Create our paginator and add it to the data array
        $data['results'] = new LengthAwarePaginator($currentPageResults, count($collection), $per_page);

        //Set base url for pagination links to follow e.g custom/url?page=6
        return $data['results']->setPath(request()->url());
    }

Thanks to this guy https://stackoverflow.com/questions/53929331/laravel-custom-pagination-on-page-2-return-as-object

Activity icon

Replied to Custom Pagination

I solved it by this code

   public static function customPaginate($data)
    {
        //Get current page form url e.g. &page=6
        $currentPage = LengthAwarePaginator::resolveCurrentPage();

        //Create a new Laravel collection from the array data
        $collection = new Collection($data);

        //Define how many items we want to be visible in each page
        $per_page = Config::PAGINATIONCOUNT;

        //Slice the collection to get the items to display in current page
        $currentPageResults = $collection->slice(($currentPage - 1) * $per_page, $per_page)->values();

        //Create our paginator and add it to the data array
        $data['results'] = new LengthAwarePaginator($currentPageResults, count($collection), $per_page);

        //Set base url for pagination links to follow e.g custom/url?page=6
        return $data['results']->setPath(request()->url());
    }

Thanks to this guy https://stackoverflow.com/questions/53929331/laravel-custom-pagination-on-page-2-return-as-object

Activity icon

Started a new Conversation Custom Pagination

when i try to create pagination for array of items in the first page it will return well but if i try to get page = 2 or 3 or .... return data of objects like this example

            "current_page": 2,
            "data": {
                "10": {
                    "rate_plane_code": "JOY5zVsquIXP651ubmI2ZRCHn+60VkMy6sCEnIonI69vEHWz+z7cpv7Ela//LGF/mVqWW107s29PAzvpSk7T1lyspOggOTXgSL+dEkUKFvy/JLceRitWPv/E3xYavCN37hNYLpEnAKJ4CEU9lcdMSgU/4X9UmeO2H33ZK+xeIczOHDQO0SxyxtfGCuh8yrQuY9pGpaJHTrqnShhlr3AF42yrSoZcESTDMr8MlVFGklJ2SpI0xjQ1/lCnGZHwWVfzSdwfL/UVTGKw6XPDRbuHEALWejtNCid/SAoeh8YqZ6GnUwUJ22JNWV10HKcOc7G0mGEs5Cq+3LJxLVfn+5pvQJEVEBEEOUh6t3McwvXw2XIy1cybjnH/ayupC6AyoQ2ADF7TwJqEZXH9TfkWWExruvJTvDqNo8U/8v5ug3d7GbjrETpkIo0KRMP57kWJ2xAGTe0AFmOgRGH6vVxqxEXHtrygOWdzHg+1/GSgl31mr7T7sKPFful1qbR0K5qBvxd/szLVAyFfJUESga2EywPXRbwOdnLa5BmTKa5P2A+Eh84cknSZQ5H0ER5gn3Bkk0n94NCE89Q9UNNsZewWOznXsg==",
                    "board": "ROOM ONLY",
                    "price": "198.9",
                    "currency": "EUR",
                    "description": null,
                    "name": [
                        "SINGLE STANDARD"
                    ],
                    "offer_name": null,
                    "offer_amount": null,
                    "offer_cuurency": null,
                    "offer_start_date": null,
                    "offer_end_date": null,
                    "images": [
                        "http://optimum-website-api.test/storage/settings/1585058240.jpg"
                    ]
                },
                "11": {
                    "rate_plane_code": "JOY5zVsquIXP651ubmI2ZRCHn+60VkMy6sCEnIonI69vEHWz+z7cpv7Ela//LGF/mVqWW107s29PAzvpSk7T1lyspOggOTXgSL+dEkUKFvy/JLceRitWPv/E3xYavCN37hNYLpEnAKJ4CEU9lcdMSgU/4X9UmeO2H33ZK+xeIczOHDQO0SxyxtfGCuh8yrQuY9pGpaJHTrqnShhlr3AF42yrSoZcESTDMr8MlVFGklJ2SpI0xjQ1/lCnGZHwWVfzi2jUF2epN+evwxqg3uCvWCN4eYr+LMzIBCbqi4bwsMMuxeVtd0FzY57jD47rMXIZbNbFh6n2tfdR2n0vaUEaOuWlSU55auoFwgCTVBpfSFDKHUV5DqNsBdA7hJZrzaVXQMBuHuLL2MdPcWzOAR/Nt9+VxKPjSJnsuXMa8P+URJmNni3rjgyn/nM2x+4qpi2dbaiuRI7SNmghvFs1ZVPC/6dO6lqLPZyo3xn5+9S2tOCPJRUgPux+H48EsChl85NWo2mHv75ltcmi71F5QeInXlQjWSQqo3iGBdKqQ2Z4GvL+hWMyHZIu6OHpMITZqVBttIZklSHBIOnhX+c98mEXNg==",
                    "board": "ROOM ONLY",
                    "price": "198.9",
                    "currency": "EUR",
                    "description": null,
                    "name": [
                        "SINGLE STANDARD"
                    ],
                    "offer_name": null,
                    "offer_amount": null,
                    "offer_cuurency": null,
                    "offer_start_date": null,
                    "offer_end_date": null,
                    "images": [
                        "http://optimum-website-api.test/storage/settings/1585058240.jpg"
                    ]
                },

i want it to be array of objects not objects of objects

Mar
01
1 month ago
Activity icon

Replied to Run Node Js File From Laravel

@bobbybouwmann yes @denisromanenko the both on same server but with different domains

Activity icon

Started a new Conversation Run Node Js File From Laravel

I have node js app on www.example.com domain then i want run it on laravel app if it is possible ??

Feb
28
1 month ago
Activity icon

Started a new Conversation Zoom Meeting

I want to create zoom meeting between some of my app users Any Help please Thanks

Activity icon

Awarded Best Reply on I Got Error On Php Artisan Migrate

I solved it by this command and all artisan commands at this case solved like this

php-cli artisan migrate

Activity icon

Replied to I Got Error On Php Artisan Migrate

I solved it by this command and all artisan commands at this case solved like this

php-cli artisan migrate

Feb
09
1 month ago
Activity icon

Started a new Conversation Large Data

I have a project with larage data and users (maybe 1000000 rows) and i will written it using laravel which database using (mysql or mongo ) ???

Thanks

Jan
19
2 months ago
Activity icon

Replied to I Got Error On Php Artisan Migrate

this is the migration file and i run the this command (php artisan migrate) it's working well on local but on server gives me mentioned error

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterCountriesTableAddColNameAr extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('countries', function (Blueprint $table) {
            $table->string('name_ar')->nullable()->after('name');
        });
        Schema::table('cities', function (Blueprint $table) {
            $table->string('name_ar')->nullable()->after('name');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('countries', function (Blueprint $table) {
            $table->dropColumn('name_ar');
        });

        Schema::table('cities', function (Blueprint $table) {
            $table->dropColumn('name_ar');
        });
    }
}
Activity icon

Started a new Conversation I Got Error On Php Artisan Migrate

I got a error when I try to do php artisan migrate on my production server

In ArgvInput.php line 261:

Invalid argument supplied for foreach()

X-Powered-By: PHP/7.2.20 Content-type: text/html; charset=UTF-8

Jan
16
2 months ago
Activity icon

Started a new Conversation XML Response

i run php curl with xml data it should return xml response but return this response

b"""
\x1Fï\x08\x00\x00\x00\x00\x00\x04\x00Ý¢\x07`\x1CIû%&/m╩{\x7FJ§JÎÓtí\x08Ç`\x13$ÏÉ@\x10ý┴ê═µÆý\x1DiG#)½*ü╩eVe]f\[email protected]╠ÝØ╝¸Ì{´¢¸Ì{´¢¸║;ØN'¸▀ ?\fd\x01l÷╬J┌╔×!Ǭ╚\x1F?~|\x1F?"\x1E \x1E´\x16ezÖÎMQ-?¹hw╝¾QÜ/ºı¼X^|÷Ð║=▀>°Þ¸8z▄T┘ÛÐÚ‗2/½U×Ê+╦µ\x11>¹ýúy█«\x1E¦¢█Lþ¨"kã¶\x15>\x1FW§┼]³r7Îù¯~ñ»¢k
¹Íııı°Û\x1E7Ì█┘┘¢¹{\x7F±³5\x03┌.ûMø-º╣{kv¾[\x1F)óO¬┘§ÐÒoWm^>/Ü÷U̼¬eúx\x07`~z¢,Vy=╬ø╗W¨ñ╔Ù╦bÜ\x03Ûâ╗\x1F¨\x10^º_ıÑ}ôÓl»│v<®¬ÀDº|yQ,sé±Q·ªXõ»█lAä┘█┘█┘Ì┘¦Ì²¶═╬├G¸\x1E>┌█\x1F?▄¦\x7Fp░¾ÓôئG;DÞ│e{R═‗¤>z¨ÓßÙÎ?y‗ïªô²O~»ÕOı'?¨¹╝¨╝z■Ë┼ıÚâıO^╬Å┐3 ┴O\x7F~·{ƒö?±ÖÅù■Ü
ö´╝▄┘}©ÀÀ¹Q·Ý¼y}¢¼ûÎ\v\x1A¯yV69¢§"[õGÃe·"╗¬│&ò7ÅWY¦.‗e█<¥╦\x1E▀Õ/zɸ>¦▀\x7FËü▄Ík\x1F­Ù¼╠\x16
¸§║h¾\e`\x1E<x©¾`º\x033─Â■Ú,[ªôÙ¶UEýÉÑOÎô¼H┐╚gEû×\x14ݧµ\x0E¯Ý<▄▀╣┐▒âfZÁm·2½▀ª/╦lÜK\x0Fø┴>x©w Óá\x036á\x05Ò╩/må┤ÀÀ¾\x10î\[email protected]
\x10|R-ù─bmÁL┐│^õEØ═Ëþ┘█╝I▀TW$Áøß?|x░┐¸i\x07¥ÅÚôu²Ë)M¦qØMl\x07øa\x12ÅÝ÷F\x1FÔ|=)+e░═░v\x0F÷\x1FýuôÒwÆ¡èÂ*o\x05Ù■■º{\x0F:░\x02╝NÄ_=\x7F¾Õï¶Úù▀}±å■ƒ~¹╦7º¤7C²t \x01IýF¿EøæÂñ\x19¨"oÙ*=!a¬│‗Vî¶Ú■¢¦═└½eØ═n\x03ÙßⲦ\e`ııı2\x07ø └\x08Êv·,o┌ÔÆð¢YÜv´\x7F║╗█eª\ez©\x01Ô■â²â«|Â̶?=■Ô°$²"+\x1AÔ \x13\x12¬2²╔"┐jn\x00{\x7F´┴╬┴¡┴VÙ:²NVË\x1Cn\x06╗w´┴º¸7é═\x16┘ÈÇ}3¤Ëƒ¼.ͨfá╗\x0F\tµFì-3Eª"»ùYKV:╗ò8<╝wp░┐æ\x1FfÙªhƒ¯Ño¾Õ\x0Fʨ═\x10┘©ýméx║ §Aj?²╝╬û3┴‗÷\x16µ┴â²{\x0F;Ó}‗ãá▀\x04rþ┴├¯î┼1&ú]¸mÔmÿxþËئ×═§±~û\x15§óZÂÀ\x01v░À{o┐KÒ\x00XQ7¡ı1‗‗ml-ë┌º=Ö\x08H±ý╦Wo¥zqÜ×<?~²·ýDöcz³‗°ıø/N_╝y¢\x19>¼┬├²ì­╔Ú╚kE÷V┤©w░s┐Kï\x00õþ¾ý:╗=;<▄¢GJr#@\x06§$/K\x12ÌuÌÕç═Ów¯\x7Fzpo#\t\x04³\x17┼ýè┤nz·nUþMƒÚ6¸▓Às´Ì⯠ZÅCL'4\x06r\x1DÍï█Éz´■âO\x0F6Æ·█┘ñ¡¬Ü<%xIú¶¨´²J\x10oÊ_H¯¯aJNvU▀ä³\x0E9Í╗»6÷Sö­u\x18g8&ª▀ø═Ë╬º¸\x1EÌ█dL¥]ò┼,╗N¤ûKK¹ÝT\x14kÌ̪\x07▓*╗]*¦ÈâîõÂ¥ıº{¸z&&ñ¤`\x17ÃE¢ó\x19Ï▄\x01╣H;¸╗J÷v\x1Dl┐╬╬3÷ö7w▒s­Ó`│ø ÝÅÙE6╦Ê'Õ:\x7FÆ]oå╣┐ÀOO\x07fHy4/&Eô~I\x1EêÛÃ═@w\x1E>©\x7F´^\x07h\x04Qå·║¢.íÂÛýéϾ\vÆUí╩µ.\x1E¯ý´ÌÙrLñïÎıyüƒ2ôO╔ïjÚ øa?8©À¹`#»\x04ê3dÕ┬═Ç╔¤█Ù▒y\x00°\fÇ┐[ıÕ,}C¯®Ê[cº█hb
░\x0F\x0E6╔*K%9┐-9Í╦63öy\x0Fo§\x019¯\x0F║]\x04úPbhh╣\x19┌¢²¹{╗]╣±\x116‗ا\x13YSo\x06Às\x7Fw´a7Vëé{Æg˨mH·­Ëç\x0F>¦d\x17,╚ô:¤▀6┼L═█f░¸÷?Ñ Ý6`¡+%üÚmÇ?|░│w\x7Fº\x03<£ú´BÍÛ\x02A:²‗ïÍà▒ù╠\x10ø┴´ý\x1E|z´ı&­¤\x11^f#Õ.ÞÂ&à§|%ãlö\x1E»█Ûó╬VDÁè\fÛ\x14■¸Ø>ê\x04î>┴×þÚ\x17 Þ_]\x17│"7vN ³┬\fvöÿ■<»)\x05gñÛå¯væS┌ðØõJá\x14¨┼\eá¦\x7FÏOÿ¶í¦Fb(ato│® "»ºÙ║þd\x19]§ä\x1C‗yû~;/.µ¶ßµÌêævv6q?õ+▓mä¨Ý9Þ`go´Aù¹├A\x14ͤR\x03|{Þêx÷║ð\x03ñ\x1Dpë®oÜî├ÌâìÂÝï\x7F¶´©╠ù½b·VíZA¥}zio ß■ÌF\x13õ§r6YÊ£ÂÝ║%ùØ\x14┼Ý\[email protected]ælÅÃân^dMS,2AZ\x01;å┌\f}gù4þw6A\x7FYþïéÓ┬%btâ▒|æò7H\x15eª\x1E▄´JıM=,²x?`¡═ØA!<ÏÞ~§;{]ö┼ö▄Ü/│ãÞÎ═ØýÌ#┼¦5ça'Ù▓\dªâ»┴[╗¸´=ýuÐz┬±*c ær├▀¢^╬µöy6¢l\x06L\x04"ıÈ\x01\x1CÓNɾ£ö\s+Ø╣¸Úº╗ø├¥W\x15ßI~┴ô5Í46C█¦┐┐┐Ð30└¥XÎU§Ëøü¦╗À¸­ßµí\x02┌ôj¦\x16┐ê┬¦ƒ$}ô5øa>á\x18║\x17fu`\x12ß^eξ u┐\x19*û\x17>}¢\x19Ûe×¥±╝══\x00\x0Fv\x0F\x1E÷d╬ºÒÙyÂ╝¿ïÝþ´íU´?|©┐ÐÂ┐..HfaÈv\x15Ûø|Z-6C=Ï'Æ\x1ElÇ·&¹Ú█`G╔õOw║~{\x00çRÆ▀¥$
˸\x1E~q\x03ñ/‗Ù┘¹ÏÊ¢¢{\x07ø¾¾

any help ???

Jan
15
2 months ago
Activity icon

Replied to There Is No Existing Directory At ".../storage/logs" And Its Not Buildable: Permission Denied

Delete Files in bootstrap/config then do this command php artisan optmize:clear

Jan
14
2 months ago
Activity icon

Started a new Conversation Pagination

I created Api for products list with pagination i want to don't repeated products in different pagination pages how can i do it ??

Thanks

Jan
12
2 months ago
Activity icon

Started a new Conversation Vue Js

I'm working as laravel developer with 3 years experience and i want to learn js framework ?? Please Help me and link for tutorials Thanks

Dec
17
3 months ago
Activity icon

Started a new Conversation Database Quries

Which better fetch data with relations or by do many queries ?? Example

$data = Data::with('relationOne','relationTwo','relationThree','relationFour')->where(..,...)->.........->get();

OR

$dataIds = Model::pluck('id');
$data = Data::whereIn('id',$dataIds)->get();

Nov
26
4 months ago
Activity icon

Started a new Conversation Login With Apple

How can i login with apple by using socialite laravel ??

Nov
18
4 months ago
Activity icon

Replied to Public Question

thanks

Activity icon

Started a new Conversation Public Question

I work as a backend developer with 3 years experience (laravel) i want to learn js framework but i don't know what is the best i read more and more all search results recommended vue becoz i work with laravel but i feel react or angular more strong than vue in many things ?

Need Help