Steps of working on clients project / Laravel / Codeignitor/CakePHP


1) Always take backup before starting.  ( हमेशा काम शुरू करने से पहले  Backup ले लेवें  )  

2) Laravel  में  हमेशा  Vendor Folder की आवश्यकता होती हैं  उसको Composer से Install  करना होता हैं 
          जैसे : Sandgrid/Sandgrid   mailer को Install करना हो तो  तथा कुछ मुख्य composer command निम्न हैं
                 :   Composer require sandgrid/sandgrid 
                 :   composer install 
                 :   composer update 
                 :   composer autodump
                 
3) हमेशा  Composer.json  फाईल की जरुरत  होती हैं ।  जिससे Composer.lock file का निर्माण होता हैं । 

4) कभी - कभी Composer.json फाईल नही हो तो  उसको  Vendor Folder से  निर्माण करना होता हैं 

https://stackoverflow.com/questions/41183742/how-to-generate-laravel-composer-json-from-a-vendor-directory

Note

downside of using this method is that the main composer.json file would include some of the packages that have been required by existing or sub packages or multiple packages. but don't worry it would be installed only one time. but there might be problem with versions.

Advice

I recommend you use some version control like git to overcome such situations in future.

can't guarantee about the following method i am going to present as its not a usual case. but might work.


5) Laravel मैं  Controller मैं  बाहरी PHP  फाईल को जोडने के लिये  निम्न   STEPS का उपयोग कर सकते हैं 

https://laraveldaily.com/how-to-use-external-classes-and-php-files-in-laravel-controller/

. Just include the class with PHP functions like include() or require() – and don’t forget app_path() function:

public function getHome()
{
  include(app_path() . '\functions\prices.php');
  $prices = getPrices();
  // ...

 

 


No comments:

Post a Comment

Pages