<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP &#8211; Admin Panel</title>
	<atom:link href="https://wpadmin.nankov.mk/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://wpadmin.nankov.mk</link>
	<description>nankov.mk nothing more</description>
	<lastBuildDate>Tue, 06 Jun 2023 09:22:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>Explore WordPress RESTful API</title>
		<link>https://wpadmin.nankov.mk/explore-wordpress-restful-api/</link>
		
		<dc:creator><![CDATA[andrejnankov@gmail.com]]></dc:creator>
		<pubDate>Mon, 17 Jan 2022 13:16:14 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://wpadmin.nankov.mk/?p=225</guid>

					<description><![CDATA[New year, new beginnings. With a new PC setup and finally a blog post on the site this year. While I was thinking about setting up a new design for https://nankov.mk I came up with a new idea. How about I move away from the old setup with React (Web, Admin) and Lumen API and&#8230; <a class="more-link" href="https://wpadmin.nankov.mk/explore-wordpress-restful-api/">Continue reading <span class="screen-reader-text">Explore WordPress RESTful API</span></a>]]></description>
										<content:encoded><![CDATA[<p>New year, new beginnings. With a new PC setup and finally a blog post on the site this year. While I was thinking about setting up a new design for <a href="https://nankov.mk">https://nankov.mk</a> I came up with a new idea. How about I move away from the old setup with React (Web, Admin) and Lumen API and move to <strong>Laravel with WordPress REST API + Admin panel.</strong></p>
<p>So what will cover the new setup</p>
<ul>
<li>SEO witch is important for better finding the site on google (on the Laravel side)</li>
<li>Google Analytics &#8211; to check visitors and see charts (on the Laravel side)</li>
<li>Admin panel which is supported out-of-the-box from WP</li>
<li>Some plugins like
<ul>
<li><a href="https://wordpress.org/plugins/wp-fastest-cache/"><strong>WP Fastest Cache</strong> </a>&#8211; for faster response on WP API</li>
<li><a href="https://wordpress.org/plugins/wp-api-swaggerui/"><strong>WP API SwaggerUI</strong></a> &#8211; documentation on the API</li>
<li><a href="https://wordpress.org/plugins/under-construction-page/"><strong>Under Construction</strong></a> &#8211; to disable the web part of the WP</li>
<li><a href="https://wordpress.org/plugins/megaoptim-image-optimizer/"><strong>MegaOptim Image Optimizer</strong></a> &#8211; for optimizing the images added from WP Admin</li>
<li><a href="https://wordpress.org/plugins/loginizer/"><strong>Loginizer</strong> </a>&#8211; to prevent brute force logins in wp-admin</li>
<li><a href="https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/"><strong>JWT Authentication for WP-API</strong></a> &#8211; to prevent (POST, PUT, DELETE) requests</li>
<li><a href="https://wordpress.org/plugins/custom-post-type-ui/"><strong>Custom Post Type UI</strong></a> &#8211; to create new models. WP by default support posts with full CRUD operations by the Admin panel.</li>
<li><a href="https://wordpress.org/plugins/advanced-custom-fields/"><strong>Advanced Custom Fields</strong></a> &#8211; to create new custom attributes for a specific model</li>
<li><a href="https://wordpress.org/plugins/acf-to-rest-api/"><strong>ACF to REST API</strong></a> &#8211; to make Advanced Custom Fields visible in the REST API</li>
</ul>
</li>
<li><a href="https://laravel.com/docs/8.x/cache"><strong>Laravel Cache</strong></a> &#8211; At the end, I did some benchmarks. <strong>The average load was more than 3.5 sec but with cache, I am getting 274 ms page load.</strong> Sounds nice right?</li>
<li><a href="https://www.hotjar.com/">Feedback</a> and <a href="https://disqus.com/">chat integration</a> (on the Laravel side)</li>
</ul>
<p>I am pretty amazed by what WP can offer. Basically, this is more than enough to make <a href="https://nankov.mk">https://nankov.mk</a> look cool and content-rich. But why did I decide to make this kind of setup?<br />
Because I want to explore and find out that there is NO limitation on what I can do with these plugins.<br />
And the power lies in <strong>“Custom Post Type UI”</strong> where you can create a model and for that model with <strong>“Advanced Custom Fields”</strong> and custom attributes where you can add them per created model. And the output is like you’re getting a new table with attributes where you can make CRUD operations by the WP Admin panel and with additional plugins you cover the same for REST.</p>
<p>I must say that for my setup populating the data took more time than creating the API. The API was like 2 hours of work. It&#8217;s crazy. So, the Laravel app was only an added value to make it all work and an additional setup for comments or taking feedback for the site.</p>
<p>For any awesome staff, there are also pros and cons.<br />
So, from this perspective the cons will be:</p>
<ul>
<li><strong>What if these plugins do not cover the new version of WP?</strong></li>
<li><strong>What if some plugin got deprecated?</strong></li>
<li><strong>We do not support version control to have some kind of history (git is missing)</strong></li>
<li><strong>What about if we need to cover the UAT or PROD environment?</strong></li>
</ul>
<p>If we are looking for an enterprise, this is far away. The clients are ready to pay even more to get the best solution in the market and be ready to make it worth it or our projects are ongoing and we can’t cover WP there.</p>
<p>My opinion is that you can cover small or medium apps and for projects like portfolios, polls, promotions, magazines, small e-commerce, funding/donations, or only manage some content on the site with editable HTML (about us, contact, blog-post, articles). Even some shared content with a mobile app and the web page can be here and It’s totally fine.</p>
<p>Everything depends but it’s on you how you will organize the project or decide to go with an easy-misy setup. I hope that you find something useful and if you have any questions feel free to contact me.</p>
<p>Best,<br />
Andrej</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel Compass Integration</title>
		<link>https://wpadmin.nankov.mk/laravel-compass-integration/</link>
		
		<dc:creator><![CDATA[andrejnankov@gmail.com]]></dc:creator>
		<pubDate>Sat, 27 Nov 2021 00:39:08 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://wpadmin.nankov.mk/?p=48</guid>

					<description><![CDATA[REST assistant for the Laravel framework Laravel Compass is an elegant REST assistant for the Laravel framework that you can use to test API calls and create API documentation. it provides automatically endpoints for GET, POST, PUT/PATCH, DELETE, various auth mechanisms, and other utility endpoints based on Laravel routes in your project. Laravel Compass require PHP&#8230; <a class="more-link" href="https://wpadmin.nankov.mk/laravel-compass-integration/">Continue reading <span class="screen-reader-text">Laravel Compass Integration</span></a>]]></description>
										<content:encoded><![CDATA[<h3>REST assistant for the Laravel framework</h3>
<p>Laravel Compass is an elegant REST assistant for the Laravel framework that you can use to test API calls and create API documentation. it provides automatically endpoints for GET, POST, PUT/PATCH, DELETE, various auth mechanisms, and other utility endpoints based on Laravel routes in your project.</p>
<p>Laravel Compass require PHP 7.2 or higher and Laravel 6.0 or higher. You may use Composer to install Compass into your Laravel project:</p>
<pre class="ql-syntax" spellcheck="false">composer require davidhsianturi/laravel-compass --dev
</pre>
<p>Once Composer is done, publish its assets using the <code>compass:install</code> Artisan command. After installing Compass, you should also run the <code>migrate</code> command:</p>
<pre class="ql-syntax" spellcheck="false">php artisan compass:install

php artisan migrate
</pre>
<p>That&#8217;s it! Next, you should be able to visit the Compass UI at <code>yourproject.test/compass</code> in your browser.</p>
<h3>UPDATING COMPASS</h3>
<p>When updating Compass, you should re-publish the assets:</p>
<pre class="ql-syntax" spellcheck="false">php artisan compass:publish
</pre>
<h3></h3>
<h3>CONFIGURATION</h3>
<p>After publishing Compass&#8217;s assets, its primary configuration file will be located at <code>config/compass.php</code> below is the default content of the config file:</p>
<pre class="ql-syntax" spellcheck="false">return [
    /*
    |--------------------------------------------------------------------------
    | Compass Path
    |--------------------------------------------------------------------------
    |
    | This is the URI path where Compass will be accessible from. Feel free
    | to change this path to anything you like.
    |
    */

    'path' =&gt; env('COMPASS_PATH', 'compass'),

    /*
    |--------------------------------------------------------------------------
    | Laravel Routes
    |--------------------------------------------------------------------------
    |
    | This is the routes rules that will be filtered for the requests list. use
    | * as a wildcard to match any characters. note that the following array
    | list "exclude" must be referenced by the route name.
    | "base_uri" is a string value as a comparison for grouping the routes.
    |
    */

    'routes' =&gt; [
        'domains' =&gt; [
            '*',
        ],

        'prefixes' =&gt; [
            '*',
        ],

        'exclude' =&gt; [
            'compass.*',
            'debugbar.*',
        ],

        'base_uri' =&gt; '*',
    ],

    /*
    |--------------------------------------------------------------------------
    | Compass Storage Driver
    |--------------------------------------------------------------------------
    |
    | This configuration options determines the storage driver that will
    | be used to store your API calls and routes. In addition, you may set any
    | custom options as needed by the particular driver you choose.
    |
    */

    'driver' =&gt; env('COMPASS_DRIVER', 'database'),

    'storage' =&gt; [
        'database' =&gt; [
            'connection' =&gt; env('DB_CONNECTION', 'mysql'),
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Compass Authenticator
    |--------------------------------------------------------------------------
    |
    | This options allow you to get all the "credentials" of users that you can
    | use to perform auth requests through the UI. when "enabled" set to "true"
    | you should adjust the authentication guard driver for your application to
    | support "token" or "sanctum".
    |
    */

    'authenticator' =&gt; [
        'enabled' =&gt; false,
        'guard' =&gt; 'api',
        'identifier' =&gt; 'email',
    ],

    /*
    |--------------------------------------------------------------------------
    | Compass Documenter Provider
    |--------------------------------------------------------------------------
    |
    | This configuration option determines the documenter provider that will be
    | used to create a beautiful API documentation. In addition, you may set
    | any custom options as needed by the particular provider you choose.
    |
    */

    'documenter' =&gt; 'documentarian',

    'provider' =&gt; [
        'documentarian' =&gt; [
            'output' =&gt; 'public/docs',
            'example_requests' =&gt; [
                'bash',
            ],
        ],
    ],
];
</pre>
<h3>MIGRATION CUSTOMIZATION</h3>
<p>If you are not going to use Compass&#8217;s default migrations, you should call the <code>Compass::ignoreMigrations</code> method in the <code>register</code> method of your <code>AppServiceProvider</code>. You may export the default migrations using the <code>php artisan vendor:publish --tag=compass-migrations</code> command.</p>
<h3></h3>
<h3>AUTHENTICATOR</h3>
<p>Compass authenticator using <a href="https://laravel.com/docs/7.x/authentication" target="_blank" rel="noopener noreferrer"><strong>Laravel authentication</strong></a> guard driver to gather all the <code>credentials</code> of users automatically that can be used to perform auth requests through the UI.</p>
<p>Currently, Compass ships with a simple based <a href="https://laravel.com/docs/6.x/api-authentication" target="_blank" rel="noopener noreferrer"><strong>Token</strong></a> guard driver and <a href="https://laravel.com/docs/7.x/sanctum" target="_blank" rel="noopener noreferrer"><strong>Laravel Sanctum</strong></a> guard driver; however, writing custom driver is simple and you are free to extend Compass Authenticator with your own guard implementations.</p>
<h3>BUILD/REBUILD DOCUMENTATION</h3>
<pre class="ql-syntax" spellcheck="false">php artisan compass:build
php artisan compass:rebuild
</pre>
<p>Now, you should be able to visit the results at <code>yourproject.test/docs/index.html</code> in your browser.</p>
<p>Cheers !!!</p>
<p>&nbsp;</p>
<p><a href="https://davidhsianturi.com/laravel-compass/documenter/">https://davidhsianturi.com/laravel-compass/documenter/</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What is the easiest php framework to learn ?</title>
		<link>https://wpadmin.nankov.mk/what-is-the-easiest-php-framework-to-learn/</link>
		
		<dc:creator><![CDATA[andrejnankov@gmail.com]]></dc:creator>
		<pubDate>Sat, 27 Nov 2021 00:32:16 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://wpadmin.nankov.mk/?p=42</guid>

					<description><![CDATA[There are a few but it depends on what you want to achieve and how much time you have to make your application up unpublished running. And we will begin from the smallest. FlightPHP &#8211; easy to use for microservices, small APIs, POC, and extremely easy and fast. A small community with a big impact, a&#8230; <a class="more-link" href="https://wpadmin.nankov.mk/what-is-the-easiest-php-framework-to-learn/">Continue reading <span class="screen-reader-text">What is the easiest php framework to learn ?</span></a>]]></description>
										<content:encoded><![CDATA[<p><em>There are a few but it depends on what you want to achieve and how much time you have to make your application up unpublished</em><em> running. And we will begin from the smallest.</em></p>
<p>FlightPHP &#8211; easy to use for microservices, small APIs, POC, and extremely easy and fast. A small community with a big impact, a framework that is patter and skeleton agnostic that gives you the power to control the app on your own. FlightPHP gives you only a small set of tools to make your app easy up and running. The whole app can be written in only a single file.</p>
<p>SlimPHP &#8211; microframework with awesome documentation that by generated skeleton follows Domain-Driven-Design but also can be customizable. Follows the psr-7 PHP standard and it’s mostly used to build APIs. The framework is easy to scale and supports nice documentation on how to integrate extra packages like ORM, template engine, csrf-protection, flash messages, caching, and many more. By itself contains manual DI container in v.3 and from v.4 you can you external DI container with auto-wiring. Also, documentation supports a nice setup for the deployment of the app. Nice framework for small teams.</p>
<p>Laravel &#8211; one of the most popular and tools reach frameworks. Some people say that begins to be the de-facto standard for building web APIs and apps. It’s the most popular among developers and everybody loves it. In the community around the world, developers begin to build packages that are only compatible with Laravel. And why is that? Because it has extremely easy documentation to read, a bunch of tutorials around, and a big community. The framework by itself follows the MVC design pattern and gives you tools to build apps extremely fast. With Laravel, you can develop things so fast that in other frameworks you will do something in days. Laravel gives more focus on business and less on code. Framework with awesome scale, an awesome framework for every PHP developer.</p>
<p>Lumen <strong>&#8211; </strong>In short if you know already Laravel this framework will be piece of cake. It’s driven by the same community and the main purpose is to be used for microservices and APIs. This framework has high compatibility with Laravel stand-alone packages, so most of the tools used in Laravel can be used here.</p>
<p>References:</p>
<p>https://bit.ly/3v4BvoH</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
