<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>PHPOnlineSupport - Recent questions and answers in Frameworks</title>
<link>http://phponlinesupport.com/qa/frameworks</link>
<description>Powered by Portrave Solutions Pvt. Ltd.</description>
<item>
<title>Answered: Getting Current date, time , day in laravel</title>
<link>http://phponlinesupport.com/376/getting-current-date-time-day-in-laravel?show=377#a377</link>
<description>

&lt;p&gt;Laravel has the &lt;em&gt;&lt;strong&gt;Carbon&lt;/strong&gt;&lt;/em&gt; dependency attached to it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Carbon::now()&lt;/strong&gt;&lt;/em&gt;, include the &lt;em&gt;&lt;strong&gt;Carbon\Carbon&lt;/strong&gt;&lt;/em&gt; namespace if necessary.&lt;/p&gt;

&lt;p&gt;Edit (usage and docs)&lt;/p&gt;

&lt;p&gt;Say I want to retrieve the date and time and output it as a string.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;$mytime = Carbon\Carbon::now();&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;echo $mytime-&amp;gt;toDateTimeString();&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This will output in the usual format of &lt;em&gt;&lt;strong&gt;Y-m-d H:i:s&lt;/strong&gt;&lt;/em&gt;, there are many pre-created formats and you will unlikely need to mess with PHP date time strings again with Carbon.&lt;/p&gt;</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/376/getting-current-date-time-day-in-laravel?show=377#a377</guid>
<pubDate>Thu, 03 Jun 2021 09:56:44 +0000</pubDate>
</item>
<item>
<title>Answered: Compile error notice in Magento 2</title>
<link>http://phponlinesupport.com/277/compile-error-notice-in-magento-2?show=278#a278</link>
<description>


&lt;p&gt;&lt;span style=&quot;font-family:arial; font-size:11pt&quot;&gt;This error appears because the parent class that your helper extended have &quot;Magento\Framework\App\Config\ScopeConfigInterface&quot; already. In that case, your class extends &quot;Magento\Framework\View\Element\Template&quot;.
&lt;br&gt;You could remove that variable in your function __construct() in &quot;MageArray\Testimonials\Helper\Data.php&quot;&lt;/span&gt;&lt;/p&gt;
</description>
<category>Zend</category>
<guid isPermaLink="true">http://phponlinesupport.com/277/compile-error-notice-in-magento-2?show=278#a278</guid>
<pubDate>Fri, 02 Feb 2018 04:24:12 +0000</pubDate>
</item>
<item>
<title>Answered: How to call .phtml file in magento 2.2?</title>
<link>http://phponlinesupport.com/269/how-to-call-phtml-file-in-magento-2-2?show=271#a271</link>
<description>


&lt;p&gt;&lt;span style=&quot;font-family:arial; font-size:11pt&quot;&gt;Those tables are related to MView from Magento 2. It's the indexer that runs in cron every minute by default. MView is used if you set the indexer mode to 'Index by Schedule'.
&lt;br&gt;
&lt;br&gt;Magento checks if the _cl tables exist, if not, are created every time the indexer/MView runs. The code related to these table creation is in \Magento\Framework\Mview\View::subscribe().
&lt;br&gt;
&lt;br&gt;The insertions in these tables are done by MySQL triggers. All triggers in Magento 2 database are used to update _cl tables: SHOW TRIGGERS. If admin changes the price of the product than it will insert rows in some of the tables. When cron runs after 1 minute, it will trigger indexing on those entities for each involved indexer. After each indexer run, if there are entities affected/cache tags (catalog_product_123), it triggers full page cache/Varnish type cleaning.
&lt;br&gt;
&lt;br&gt;_cl tables rows are deleted if are old, like every hour. There is a cron job for this.
&lt;br&gt;
&lt;br&gt;// Magento_Indexer/etc/crontab.xml
&lt;br&gt;&amp;lt;job name=&quot;indexer_clean_all_changelogs&quot; instance=&quot;Magento\Indexer\Cron\ClearChangelog&quot; method=&quot;execute&quot;&amp;gt;
&lt;br&gt;&amp;lt;schedule&amp;gt;0 * * * *&amp;lt;/schedule&amp;gt;
&lt;br&gt;&amp;lt;/job&amp;gt;&lt;/span&gt;&lt;/p&gt;
</description>
<category>Frameworks</category>
<guid isPermaLink="true">http://phponlinesupport.com/269/how-to-call-phtml-file-in-magento-2-2?show=271#a271</guid>
<pubDate>Tue, 30 Jan 2018 08:04:24 +0000</pubDate>
</item>
<item>
<title>Answered: Creating extra row without data in excel using PHPEXCEL in codeigniter</title>
<link>http://phponlinesupport.com/219/creating-extra-without-data-excel-using-phpexcel-codeigniter?show=225#a225</link>
<description>The best of options in my option is to go with the pretty class developed by Eliselab&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/bcit-ci/CodeIgniter/wiki/Export-to-Excel-2013&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/bcit-ci/CodeIgniter/wiki/Export-to-Excel-2013&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Place this on your controller and you are good to go&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;load-&amp;gt;library('export');&lt;br /&gt;
$this-&amp;gt;load-&amp;gt;model('YourModel');&lt;br /&gt;
&lt;br /&gt;
$result = $this-&amp;gt;YourModel-&amp;gt;YourQueryFunction();&lt;br /&gt;
$this-&amp;gt;export-&amp;gt;to_excel($result, 'FileNameHere');</description>
<category>CodeIgniter</category>
<guid isPermaLink="true">http://phponlinesupport.com/219/creating-extra-without-data-excel-using-phpexcel-codeigniter?show=225#a225</guid>
<pubDate>Thu, 09 Mar 2017 07:05:26 +0000</pubDate>
</item>
<item>
<title>SEO module for laravel</title>
<link>http://phponlinesupport.com/209/seo-module-for-laravel</link>
<description>Which is a good SEO module for laravel?</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/209/seo-module-for-laravel</guid>
<pubDate>Mon, 13 Feb 2017 07:43:08 +0000</pubDate>
</item>
<item>
<title>Answered: Remove image tags from a content</title>
<link>http://phponlinesupport.com/201/remove-image-tags-from-a-content?show=204#a204</link>
<description>This is very simple.&lt;br /&gt;
&lt;br /&gt;
Its on laravel blade, you can do it with CSS.</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/201/remove-image-tags-from-a-content?show=204#a204</guid>
<pubDate>Tue, 31 Jan 2017 11:48:40 +0000</pubDate>
</item>
<item>
<title>Answered: Laravel Hit Tracker</title>
<link>http://phponlinesupport.com/192/laravel-hit-tracker?show=193#a193</link>
<description>Check this out&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/antonioribeiro/tracker&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/antonioribeiro/tracker&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I have not used this personally, but should match your requirement here. Please also let us know how this goes through. This seems to be a well maintained package.</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/192/laravel-hit-tracker?show=193#a193</guid>
<pubDate>Wed, 07 Dec 2016 08:58:45 +0000</pubDate>
</item>
<item>
<title>Answered: mangopay integration with codeigniter</title>
<link>http://phponlinesupport.com/190/mangopay-integration-with-codeigniter?show=191#a191</link>
<description>You can use this library for that. &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/Mangopay/mangopay2-php-sdk&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/Mangopay/mangopay2-php-sdk&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Try it, should work for you without an issue.</description>
<category>CodeIgniter</category>
<guid isPermaLink="true">http://phponlinesupport.com/190/mangopay-integration-with-codeigniter?show=191#a191</guid>
<pubDate>Tue, 06 Dec 2016 17:07:13 +0000</pubDate>
</item>
<item>
<title>Laravel and wordpress</title>
<link>http://phponlinesupport.com/189/laravel-and-wordpress</link>
<description>Laravel and wordpress can work together in the same folder? Can anyone share some exprience on this please as I'm in planning for a new project and if possible would like to do so.&lt;br /&gt;
&lt;br /&gt;
Thank you in advance...</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/189/laravel-and-wordpress</guid>
<pubDate>Tue, 06 Dec 2016 07:57:59 +0000</pubDate>
</item>
<item>
<title>load js files dynamically on the fly</title>
<link>http://phponlinesupport.com/166/load-js-files-dynamically-on-the-fly</link>
<description>


&lt;p&gt;How can I tell Laravel-5 which Javascript files I want to include in a template.&lt;/p&gt;

&lt;p&gt;For example, I have my Controller with something like this:&lt;/p&gt;

&lt;pre&gt;return view('butchery', ['locations' =&amp;gt; $locations, 'classTypes' =&amp;gt; $classTypes]);&lt;/pre&gt;

&lt;p&gt;I have my &lt;em&gt;butchery.blade.php&lt;/em&gt; template with my html:&lt;/p&gt;

&lt;pre&gt;@extends('app')
@section('content')
&amp;lt;!-- html here --&amp;gt;
@endsection&lt;/pre&gt;

&lt;p&gt;...and I have my app.blade.php container template with all my javascript files at the bottom. If I didn't want to include one of the javascript files in my view, how would I do that?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;app.blade.php&lt;/em&gt;:&lt;/p&gt;

&lt;pre&gt;&amp;lt;!DOCTYPE HTML&amp;gt;
&amp;lt;!--[if IE 8]&amp;gt;&amp;lt;html class=&quot;ie8&quot;&amp;gt; &amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if gt IE 8]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;html&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;

&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;@yield('content')&amp;lt;/body&amp;gt;
&amp;lt;script src=&quot;/js/mobile-menu.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;!-- apply voucher code --&amp;gt; 
&amp;lt;script src=&quot;/js/voucher-apply.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/166/load-js-files-dynamically-on-the-fly</guid>
<pubDate>Mon, 17 Oct 2016 03:22:30 +0000</pubDate>
</item>
<item>
<title>Answered: Database Backup Manager</title>
<link>http://phponlinesupport.com/137/database-backup-manager?show=138#a138</link>
<description>Driver to seamlessly integrate the Backup Manager into Laravel 4 and 5 applications. &lt;br /&gt;
&lt;br /&gt;
Laravel Driver for the Database Backup Manager&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/backup-manager/laravel&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/backup-manager/laravel&lt;/a&gt;</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/137/database-backup-manager?show=138#a138</guid>
<pubDate>Tue, 23 Aug 2016 06:33:06 +0000</pubDate>
</item>
<item>
<title>Answered: Sitemap module for Kohana</title>
<link>http://phponlinesupport.com/127/sitemap-module-for-kohana?show=136#a136</link>
<description>This should be what you need,&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/ThePixelDeveloper/kohana-sitemap&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/ThePixelDeveloper/kohana-sitemap&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I have not used it anytime before though. Check it out.</description>
<category>Kohana</category>
<guid isPermaLink="true">http://phponlinesupport.com/127/sitemap-module-for-kohana?show=136#a136</guid>
<pubDate>Tue, 23 Aug 2016 06:11:37 +0000</pubDate>
</item>
<item>
<title>Answered: Scheduled tasks with Kohana application</title>
<link>http://phponlinesupport.com/128/scheduled-tasks-with-kohana-application?show=135#a135</link>
<description>Checkout this cron application &lt;a href=&quot;https://github.com/cbandy/kohana-cron&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/cbandy/kohana-cron&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Pretty good actually as far as I checked, this works without any issues.</description>
<category>Kohana</category>
<guid isPermaLink="true">http://phponlinesupport.com/128/scheduled-tasks-with-kohana-application?show=135#a135</guid>
<pubDate>Tue, 23 Aug 2016 06:10:20 +0000</pubDate>
</item>
<item>
<title>Answered: PostgreSQL database module</title>
<link>http://phponlinesupport.com/129/postgresql-database-module?show=134#a134</link>
<description>Here it is!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/cbandy/kohana-postgresql&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/cbandy/kohana-postgresql&lt;/a&gt;</description>
<category>Kohana</category>
<guid isPermaLink="true">http://phponlinesupport.com/129/postgresql-database-module?show=134#a134</guid>
<pubDate>Tue, 23 Aug 2016 06:07:23 +0000</pubDate>
</item>
<item>
<title>Answered: Captcha for Kohana</title>
<link>http://phponlinesupport.com/130/captcha-for-kohana?show=133#a133</link>
<description>


&lt;p&gt;&lt;a href=&quot;https://github.com/kolanos/kohana-captcha&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/kolanos/kohana-captcha&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the Captcha library ported from Kohana 2.3.x to 3.x. Very little has changed API-wise, although there have been a few changes.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;Instantiate a captcha:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $captcha = Captcha::instance();&lt;/p&gt;

&lt;p&gt;Instantiate using your own config group (other than 'default'):&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $captcha = Captcha::instance('myconfig');&lt;/p&gt;

&lt;p&gt;Render a captcha:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $captcha-&amp;gt;render();&lt;/p&gt;

&lt;p&gt;or just:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $captcha;&lt;/p&gt;

&lt;p&gt;Validate the captcha:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Captcha::valid($_POST['captcha']);&lt;/p&gt;

&lt;p&gt;By default image-based captchas are rendered with HTML, the HTML is a very simple tag. If you want to handle your own rendering of the captcha simply set the first parameter for render() to FALSE:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $captcha-&amp;gt;render(FALSE);&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Captcha styles&lt;/strong&gt;&lt;/h2&gt;

&lt;ul&gt;

&lt;li&gt;alpha&lt;/li&gt;

&lt;li&gt;basic&lt;/li&gt;

&lt;li&gt;black&lt;/li&gt;

&lt;li&gt;math&lt;/li&gt;

&lt;li&gt;riddle&lt;/li&gt;

&lt;li&gt;word&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;&lt;/p&gt;
</description>
<category>Kohana</category>
<guid isPermaLink="true">http://phponlinesupport.com/130/captcha-for-kohana?show=133#a133</guid>
<pubDate>Tue, 23 Aug 2016 06:04:15 +0000</pubDate>
</item>
<item>
<title>Answered: Setting a layout view and variables for layout in before()</title>
<link>http://phponlinesupport.com/131/setting-a-layout-view-and-variables-for-layout-in-before?show=132#a132</link>
<description>


&lt;pre&gt;You need to extend your controller template like this below.

class Controller_Main extends Controller_Template {
   //This it the main html container i suggest use html5boilerplaite
   public function $_template = 'layout'; 

   public function action_index() {
      $data = array();
      $this-&amp;gt;template-&amp;gt;content = View::factory('frontend/home',$data);
   }
}

class Controller_Profile extends Controller_Main{

   public function action_index() {
      $data = array();
      $this-&amp;gt;template-&amp;gt;content = View::factory('frontend/profile',$data);
   }
}&lt;/pre&gt;
</description>
<category>Kohana</category>
<guid isPermaLink="true">http://phponlinesupport.com/131/setting-a-layout-view-and-variables-for-layout-in-before?show=132#a132</guid>
<pubDate>Tue, 23 Aug 2016 06:01:41 +0000</pubDate>
</item>
<item>
<title>Answered: Phalcon PHP error handling</title>
<link>http://phponlinesupport.com/115/phalcon-php-error-handling?show=118#a118</link>
<description>


&lt;p&gt;&lt;a href=&quot;https://docs.phalconphp.com/en/latest/reference/models.html#creating-updating-records&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://docs.phalconphp.com/en/latest/reference/models.html#creating-updating-records&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&amp;lt;?php

$robot       = new Robots();
$robot-&amp;gt;type = &quot;mechanical&quot;;
$robot-&amp;gt;name = &quot;Astro Boy&quot;;
$robot-&amp;gt;year = 1952;

if ($robot-&amp;gt;save() == false) {
    echo &quot;Umh, We can't store robots right now: \n&quot;;
    foreach ($robot-&amp;gt;getMessages() as $message) {
        echo $message, &quot;\n&quot;;
    }
} else {
    echo &quot;Great, a new robot was saved successfully!&quot;;
}&lt;/pre&gt;
</description>
<category>Phalcon</category>
<guid isPermaLink="true">http://phponlinesupport.com/115/phalcon-php-error-handling?show=118#a118</guid>
<pubDate>Tue, 02 Aug 2016 03:43:23 +0000</pubDate>
</item>
<item>
<title>Answered: Install version of PHP Buildpack extension, Phalcon?</title>
<link>http://phponlinesupport.com/116/install-version-of-php-buildpack-extension-phalcon?show=117#a117</link>
<description>Had not done this before, but you could just upgrade the buildpack and following the phalcon thereafter. Shoudnt be a problem. Do this over console,</description>
<category>Phalcon</category>
<guid isPermaLink="true">http://phponlinesupport.com/116/install-version-of-php-buildpack-extension-phalcon?show=117#a117</guid>
<pubDate>Tue, 02 Aug 2016 03:39:15 +0000</pubDate>
</item>
<item>
<title>Answered: CakePHP and Bootstrap</title>
<link>http://phponlinesupport.com/87/cakephp-and-bootstrap?show=88#a88</link>
<description>You would be definitely interested in looking onto this.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/midorikocak/Cakephp-Bootstrappifier&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/midorikocak/Cakephp-Bootstrappifier&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thats a cool stuff, and an awesome lady coder project :)</description>
<category>CakePHP</category>
<guid isPermaLink="true">http://phponlinesupport.com/87/cakephp-and-bootstrap?show=88#a88</guid>
<pubDate>Wed, 29 Jun 2016 15:10:15 +0000</pubDate>
</item>
<item>
<title>Answered: Help with Slim form</title>
<link>http://phponlinesupport.com/25/help-with-slim-form?show=27#a27</link>
<description>


&lt;pre&gt;::src/routes.php

$app-&amp;gt;post('/upload', function ($request, $response, $args) {
    $files = $request-&amp;gt;getUploadedFiles();
    if (empty($files['newfile'])) {
        throw new Exception('Expected a newfile');
    }

    $newfile = $files['newfile'];
    // do something with $newfile
});

To check that there is no error and to move the file to some other location, use this checking:
&lt;/pre&gt;

&lt;pre&gt;if ($newfile-&amp;gt;getError() === UPLOAD_ERR_OK) {
    $uploadFileName = $newfile-&amp;gt;getClientFilename();
    $newfile-&amp;gt;moveTo(&quot;/path/to/$uploadFileName&quot;);
}

There are other useful methods like getClientMediaType() and getSize() also. Please use as per your needs.
&lt;/pre&gt;
</description>
<category>Slim</category>
<guid isPermaLink="true">http://phponlinesupport.com/25/help-with-slim-form?show=27#a27</guid>
<pubDate>Wed, 25 May 2016 11:53:08 +0000</pubDate>
</item>
<item>
<title>Answered: Codeigniter with wordpress same domain with optimum performance possible?</title>
<link>http://phponlinesupport.com/7/codeigniter-wordpress-domain-optimum-performance-possible?show=11#a11</link>
<description>No such thoughts like &amp;quot;why not possible&amp;quot;? Answer is Yes! its a very possible thing to do. There is no conflict between these two as far as I know. Both are built for speed and reliability. Only thing is that you may need to invest sometime on this tweaking the setup and closely watching the htaccess.</description>
<category>CodeIgniter</category>
<guid isPermaLink="true">http://phponlinesupport.com/7/codeigniter-wordpress-domain-optimum-performance-possible?show=11#a11</guid>
<pubDate>Wed, 18 May 2016 09:36:04 +0000</pubDate>
</item>
</channel>
</rss>