laravelɾ³ýµÚÈý·½¿â
ÔÚʹÓÃlaravel¿ò¼Ü¾ÙÐÐweb¿ª·¢µÄÀú³ÌÖУ¬ÎÒÃÇͨ³£»áÒýÈëһЩµÚÈý·½¿âÀ´×ÊÖúÎÒÃǸü¿ìËÙ¡¢¸ßЧµØ¿ª·¢Ó¦ÓóÌÐò¡£¿ÉÊÇ£¬ÔÚÏÖʵµÄ¿ª·¢ÖУ¬ÎÒÃÇ¿ÉÄÜ»áÓöµ½ÒªÉ¾³ýµôijЩ²»ÐèҪʹÓõĿâµÄÇéÐΡ£
ÄÇô£¬ÔÚLaravel¿ò¼ÜÖУ¬ÔõÑùɾ³ýµÚÈý·½¿âÄØ£¿±¾ÎĽ«ÎªÄúÏêϸÏÈÈÝ¡£
µÚÒ»ÖÖ·½·¨£ºÊÖ¶¯É¾³ý
×î¼òÆÓ¡¢×îÖ±½ÓµÄÒªÁì¾ÍÊÇÊÖ¶¯É¾³ýµÚÈý·½¿â¡£
¼ÙÉèÎÒÃÇҪɾ³ýµÄÊÇSpatieµÄLaravel-Permission¿â£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏ°취À´ÊµÏÖɾ³ý£º
·¿ªcomposer.jsonÎļþ£¬ÕÒµ½”require”×ֶΣ¬½«”Laravel-Permission”µÄÕâÒ»ÐÐɾ³ý¡£
·¿ª/config/app.phpÎļþ£¬ÕÒµ½”providers”ºÍ”aliases”×ֶΣ¬½«ÓëLaravel-PermissionÓйصÄÐÐɾ³ý¡£
ÔËÐÐComposer updateÏÂÁ½«¸üкóµÄcomposer.jsonÎļþÖÐLaravel-PermissionµÄÐÅÏ¢´ÓvendorĿ¼ÖÐɾ³ý¡£
ËäÈ»ÕâÖÖÒªÁì¿´ÆðÀ´¼òÆÓÖ±½Ó£¬¿ÉÊÇËüÓÐÒ»¸öÈõµã£¬¾ÍÊÇÐèÒªÊÖ¶¯´¦Àíÿһ¸öÐèҪɾ³ýµÄ¿â£¬ÈôÊÇÐèҪɾ³ý¶à¸ö¿â£¬ÄÇôÕâÑù×ö¾Í»á±äµÃºÜƶÀ§¡£
µÚ¶þÖÖ·½·¨£ºÊ¹ÓÃComposer
ÔÚLaravel¿ò¼ÜÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýComposer¹¤¾ßÀ´ÖÎÀíÄ£¿é¡£Òò´Ë£¬Ê¹ÓÃComposerÒ²ÊÇÒ»ÖÖɾ³ýµÚÈý·½¿âµÄÓÐÓ÷½·¨¡£
¼ÙÉèÎÒÃÇÕÕ¾ÉҪɾ³ýSpatieµÄLaravel-Permission¿â£¬ÕâʱÎÒÃÇ¿ÉÒÔͨ¹ýComposerµÄremoveÏÂÁîÀ´Ð¶Ôظÿ⡣Ïêϸ°ì·¨ÈçÏ£º
ÔÚÖÕ¶ËÖнøÈëÏîÄ¿µÄ¸ùĿ¼£¬È»ºóÔËÐÐÒÔÏÂÏÂÁ
composer remove spatie/laravel-permission
µÇ¼ºó¸´ÖÆ
Õâ»á½«Laravel-Permission´ÓÎÒÃǵÄÏîÄ¿ÖÐÒƳýµô¡£
Ö´ÐÐComposer updateÏÂÁî¸üÐÂComposer.lockÎļþ¡£
composer update
µÇ¼ºó¸´ÖÆ
ÕâÒ»²½ÊDZØÐèµÄ£¬ÓÉÓÚComposer.lockÎļþ¼Í¼ÁËÎÒÃÇËùʹÓõÄËùÓпâµÄ°æ±¾ÐÅÏ¢¡£Ö»ÓÐÔÚ¸üÐÂÁËÕâ¸öÎļþÖ®ºó£¬ÎÒÃǵÄÏîÄ¿²Å»á׼ȷµØ¸üпâµÄ°æ±¾ÐÅÏ¢¡£
ʹÓÃComposerµÄÓŵãÊÇ£¬Ëü¿ÉÒÔ×Ô¶¯¼ì²éÎÒÃǵÄÏîÄ¿²¢É¾³ýÎÒÃDz»ÔÙÐèÒªµÄ¿â¡£ÁíÍ⣬ÎÒÃÇ¿ÉÒÔ½«ÐèҪɾ³ýµÄ¿âµÄÐÅÏ¢Ìí¼Óµ½Composer.jsonÎļþÖУ¬Ö»ÐèÒªÖ´ÐÐÒ»ÌõÏÂÁî¾Í¿ÉÒÔɾ³ýµôÕâЩ¿â¡£
×ܽá
±¾ÎÄÏÈÈÝÁËÁ½ÖÖɾ³ýµÚÈý·½¿âµÄÒªÁ죺ÊÖ¶¯É¾³ýºÍʹÓÃComposer¡£ËäÈ»ÊÖ¶¯É¾³ýÒªÁì¼òÆÓÖ±½Ó£¬µ«ÐèÒªÊÖ¶¯´¦Àíÿһ¸öÐèҪɾ³ýµÄ¿â£¬²»Ì«ÊʺÑþ³Øý¶à¸ö¿â¡£Ê¹ÓÃComposerµÄÓŵãÊÇ¿ÉÒÔ×Ô¶¯»¯µØÖÎÀíÎÒÃǵĿ⣬ͬʱҲ¿ÉÒÔÀû±ãµØÉý¼¶ºÍɾ³ý¿â£¬ÊǸüΪÓÐÓõķ½·¨¡£
ÒÔÉϾÍÊÇlaravelɾ³ýµÚÈý·½¿âµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡