{"id":207043,"date":"2019-11-12T14:05:30","date_gmt":"2019-11-12T14:05:30","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=207043"},"modified":"2022-09-14T11:19:53","modified_gmt":"2022-09-14T11:19:53","slug":"how-to-make-your-package-compatible-with-laravel-bagisto-saas-module","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/","title":{"rendered":"How To Make Your Package Compatible With Laravel-Bagisto SaaS Module"},"content":{"rendered":"\n<p>Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module, you can check the <strong>Bagisto SaaS Module<\/strong> feature by following this <a href=\"https:\/\/webkul.com\/blog\/laravel-ecommerce-multi-tenant-saas-module\/\"><strong>link<\/strong><\/a>. <\/p>\n\n\n\n<p>To make your package compatible, you have to create another package for SaaS Module. Suppose your package name is PreOrder then create the SaaSPreOrder package. After this, you have to follow the below steps for making the package compatible:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1) Create Migrations for your package&#8217;s Models<\/h2>\n\n\n\n<p>You have to create the migration for all the model files of your base package in the new SaaS package (i.e. SaaSPreOrder package). We have to make a relation between the <em><strong>&#8220;companies table&#8221;<\/strong><\/em> and your package&#8217;s tables. For making this possible you have to create the migration for all the tables of your package (i.e. PreOrder package) in the new SaaS package (i.e. SaaSPreOrder package) for adding the <strong>&#8220;company_id&#8221;<\/strong> column in your package table. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"966\" height=\"665\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207086\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png 966w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png 768w\" sizes=\"(max-width: 966px) 100vw, 966px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong><code>php artisan make:migration add_company_id_to_pre_order_items --path=packages\/Webkul\/SaaSPreOrder\/src\/Database\/Migrations<\/code><\/strong><\/p><\/blockquote>\n\n\n\n<p>In the above screenshot, you will see we have created a migration i.e. <strong>AddCompanyIdToPreOrderItems<\/strong> in the new SaaS package (i.e. SaaSPreOrder package) to add the <em><strong>&#8220;company_id&#8221;<\/strong><\/em> column in <em><strong>&#8220;pre_order_items&#8221;<\/strong><\/em> table on the below path. Here we defined the company_id column as a <em><strong>foreign key constraint<\/strong><\/em>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong><code>php artisan migrate<\/code><\/strong><\/p><\/blockquote>\n\n\n\n<p>Create the migration for each of the models with the above command.<\/p>\n\n\n\n<p><strong>Note:<\/strong> If your migration has and unique constraint in the base package (i.e. PreOrder package), then you have to remove that constraint first and after adding the <strong>&#8216;company_id&#8217;<\/strong> field you have to add the unique constraint with both the fields i.e. base table unique field and newly added company_id field in the new saas package (i.e. SaasPreOrder package).<\/p>\n\n\n\n<p><code> <\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1062\" height=\"646\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/add_unique_constraint.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207217\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/add_unique_constraint.png 1062w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/add_unique_constraint.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/add_unique_constraint.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/add_unique_constraint.png 768w\" sizes=\"(max-width: 1062px) 100vw, 1062px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2) Extend Base Package Models<\/h2>\n\n\n\n<p>After creating the migration of all the models for the Laravel development services Saas package (i.e. SaasPreOrder package), You have to extend each model of the base package.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1081\" height=\"574\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/extend_base_model.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207111\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/extend_base_model.png 1081w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/extend_base_model.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/extend_base_model.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/extend_base_model.png 768w\" sizes=\"(max-width: 1081px) 100vw, 1081px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In the above screenshot, We extended the <strong>BaseModel<\/strong> (referring PreOrderItem model of the base package) in the <strong>PreOrderItem<\/strong> model of the SaasPreOrder package.<\/p>\n\n\n\n<p>In the extended model, We have overridden the <strong>$fillable<\/strong> property by adding the <strong>&#8216;company_id&#8217;<\/strong> field. For more details regarding the $fillable variable follow <a href=\"https:\/\/laravel.com\/docs\/4.2\/eloquent#mass-assignment\">Laravel Fillable Property<\/a><\/p>\n\n\n\n<p>We have also overridden the default query builder by using a newly added field i.e. &#8216;<strong>company_id<\/strong>&#8216; in the where clause. By doing this we do not need to override all default methods of the query builder i.e. <strong>getAll()<\/strong>.<\/p>\n\n\n\n<p>In the overridden <strong>newEloquentBuilder<\/strong> method, We used &#8220;<strong>Company<\/strong> <strong>Facade<\/strong>&#8221; by which you can call the common methods of the Laravel-Bagisto SaaS Module.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong><code>Company::getCurrent()<\/code><\/strong> By using <strong>getCurrent<\/strong> method you can get the detail of the current company. Also, you can use the <strong><code>auth()->guard('super-admin')->check()<\/code><\/strong> guard to make the difference between the <strong>Super Admin<\/strong> and <strong>Normal Admin<\/strong>.<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3) Override Package&#8217;s Models <\/h2>\n\n\n\n<p>After extending all the models in the new Saas package (i.e. SaasPreOrder package), You have to override each model of the base package with the newly created model of the Saas package (i.e. SaasPreOrder package). For making this possible you have to register your models in <em>the<\/em><strong><em> &#8220;NewSaasServiceProvider.php&#8221;<\/em><\/strong> file of your SaasPreOrder package.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"949\" height=\"515\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/override_models-1.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207104\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/override_models-1.png 949w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/override_models-1.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/override_models-1.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/override_models-1.png 768w\" sizes=\"(max-width: 949px) 100vw, 949px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>You have to define a method <em><strong>i.e. overrideModels<\/strong><\/em> and call it from the <strong>boot(Router $router)<\/strong> method of your ServiceProvider.php. For more detail regarding <a href=\"https:\/\/laravel.com\/docs\/5.8\/providers#the-boot-method\">Laravel ServiceProvider<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"997\" height=\"290\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/overrideModel.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207106\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/overrideModel.png 997w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/overrideModel.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/overrideModel.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/overrideModel.png 768w\" sizes=\"(max-width: 997px) 100vw, 997px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>You will see, in the above screenshot, that we registered the model contracts <strong>Contracts\\PreorderItem<\/strong> of the base package with the newly created model under the overrideModels method declaration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4) Create Observers To Listen To Model Events<\/h2>\n\n\n\n<p>In the Saas package, we will use Laravel Observers to listen to the multiple events of overridden models. For this, you have to create observer classes to listen to the event of overridden models in your new SaasServiceProvider.php class. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"933\" height=\"359\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/observer_class.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207221\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/observer_class.png 933w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/observer_class.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/observer_class.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/observer_class.png 768w\" sizes=\"(max-width: 933px) 100vw, 933px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In the above screenshot, you can see we used the overridden model <strong><em>i.e. PreOrderItems<\/em><\/strong> of SaasPreOrder package, and passed it to the creating method as a parameter.<\/p>\n\n\n\n<p><strong>Note:<\/strong> You can use the below methods of an observer class: created, <strong>updated, and deleted<\/strong><\/p>\n\n\n\n<p>To register an observer you have to use the <strong>observe() method<\/strong> on the model which you want to observe. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\\Webkul\\SaasPreOrderPackage\\Models\\PreOrderItems::observe(\\Webkul\\SaasPreOrderPackage\\Observers\\PreOrderItems<em>Observer<\/em>::class);<\/p><\/blockquote>\n\n\n\n<p>You have to register your observers to the <strong>boot() method<\/strong> of your package&#8217;s service provider class i.e. SaasPreOrderServiceProvider.php.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1063\" height=\"615\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/listenObserver.png\" alt=\"Laravel-Bagisto SaaS Module\" class=\"wp-image-207227\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/listenObserver.png 1063w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/listenObserver.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/listenObserver.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/listenObserver.png 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>You can take reference regarding <a href=\"https:\/\/webkul.com\/laravel-development\/\">Laravel Development Service<\/a> Observer by following this <a href=\"https:\/\/laravel.com\/docs\/5.8\/eloquent#observers\">Link<\/a>.<\/p>\n\n\n\n<p>After making these changes run the below commands from Bagisto Root Directory:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong><code>$ composer dump-autoload<\/code><\/strong><\/p><\/blockquote>\n\n\n\n<p>Thanks for reading this article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module, you can check the Bagisto SaaS Module feature by following this link. To make your package compatible, you have to create another package for SaaS Module. Suppose your package name is PreOrder then create the SaaSPreOrder package. <a href=\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8396,8929],"tags":[9907,8054],"class_list":["post-207043","post","type-post","status-publish","format-standard","hentry","category-bagisto","category-e-commerce-bagisto","tag-bagisto-ecommerce-platform","tag-laravel-ecommerce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Make Your Package Compatible With Laravel<\/title>\n<meta name=\"description\" content=\"Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Make Your Package Compatible With Laravel\" \/>\n<meta property=\"og:description\" content=\"Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-12T14:05:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-14T11:19:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png\" \/>\n<meta name=\"author\" content=\"Vivek Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vivek Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\"},\"author\":{\"name\":\"Vivek Sharma\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/55a090ee89f2ea288152d9618972d51a\"},\"headline\":\"How To Make Your Package Compatible With Laravel-Bagisto SaaS Module\",\"datePublished\":\"2019-11-12T14:05:30+00:00\",\"dateModified\":\"2022-09-14T11:19:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\"},\"wordCount\":754,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png\",\"keywords\":[\"Bagisto ecommerce platform\",\"Laravel eCommerce\"],\"articleSection\":[\"Bagisto\",\"E commerce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\",\"name\":\"How To Make Your Package Compatible With Laravel\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png\",\"datePublished\":\"2019-11-12T14:05:30+00:00\",\"dateModified\":\"2022-09-14T11:19:53+00:00\",\"description\":\"Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png\",\"width\":966,\"height\":665},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Make Your Package Compatible With Laravel-Bagisto SaaS Module\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/55a090ee89f2ea288152d9618972d51a\",\"name\":\"Vivek Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/016ec12a9caaedb7c6003878edfc412b2e9a5159e75bac4338ab7eeaaec9d92d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/016ec12a9caaedb7c6003878edfc412b2e9a5159e75bac4338ab7eeaaec9d92d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vivek Sharma\"},\"sameAs\":[\"https:\/\/store.webkul.com\/\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/viveksh047\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Make Your Package Compatible With Laravel","description":"Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/","og_locale":"en_US","og_type":"article","og_title":"How To Make Your Package Compatible With Laravel","og_description":"Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module","og_url":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2019-11-12T14:05:30+00:00","article_modified_time":"2022-09-14T11:19:53+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png","type":"","width":"","height":""}],"author":"Vivek Sharma","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vivek Sharma","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/"},"author":{"name":"Vivek Sharma","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/55a090ee89f2ea288152d9618972d51a"},"headline":"How To Make Your Package Compatible With Laravel-Bagisto SaaS Module","datePublished":"2019-11-12T14:05:30+00:00","dateModified":"2022-09-14T11:19:53+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/"},"wordCount":754,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png","keywords":["Bagisto ecommerce platform","Laravel eCommerce"],"articleSection":["Bagisto","E commerce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/","url":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/","name":"How To Make Your Package Compatible With Laravel","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png","datePublished":"2019-11-12T14:05:30+00:00","dateModified":"2022-09-14T11:19:53+00:00","description":"Today we will learn how to make your Laravel development packages compatible with the Laravel Bagisto SaaS Module","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2019\/11\/AddCompanyIdToTable.png","width":966,"height":665},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-make-your-package-compatible-with-laravel-bagisto-saas-module\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Make Your Package Compatible With Laravel-Bagisto SaaS Module"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/55a090ee89f2ea288152d9618972d51a","name":"Vivek Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/016ec12a9caaedb7c6003878edfc412b2e9a5159e75bac4338ab7eeaaec9d92d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/016ec12a9caaedb7c6003878edfc412b2e9a5159e75bac4338ab7eeaaec9d92d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vivek Sharma"},"sameAs":["https:\/\/store.webkul.com\/"],"url":"https:\/\/webkul.com\/blog\/author\/viveksh047\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/207043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=207043"}],"version-history":[{"count":9,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/207043\/revisions"}],"predecessor-version":[{"id":352535,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/207043\/revisions\/352535"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=207043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=207043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=207043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}