Platform installation Orchid – Laravel Admin Panel

Posted Posted in Work

Before you can use the platform, you need to install it. This guide should help you perform a simple installation to start the project.

Create a project

Note. If you already have Laravel installation, you can skip this step.

Being a package for the framework, you must first install Laravel. This can be done using the Composer dependency management tool by running the composer create-project command in your terminal:

$ composer create-project laravel/laravel orchid-project "8.*" --prefer-dist

For more information on how to install Laravel, follow Official Laravel Installation Guide.

Don’t you have Composer? It’s easy to install by following the instructions on the download page.

It will create a new orchid-project directory, load the dependencies, and generate the leading directories and files you need to get started. In other words, install your new framework project.

Do not forget

  • Set “chmod -R o+w” rights to the storage and bootstrap/cache directories
  • Edit the .env file

Note. If you just installed Laravel, you may need to generate a key with command php artisan key:generate

Add dependency

Go to the created project directory and run the command:

$ composer require orchid/platform

Note. You also need to create a new database, update the .env file with credentials, and add your application’s URL to the variable APP_URL.

Platform installation

Note. The installation will overwrite the app/Models/User model.

Run the installation process by running the command:

php artisan orchid:install

Create user

To create a user with maximum permissions, you can run the following command with a username, email, and password:

php artisan orchid:admin admin admin@admin.com password

Start local server

If you haven’t installed a server (Nginx, Apache, etc.) to run the project, you can use the built-in server:

php artisan serve

Open a browser and go to http://localhost:8000/admin. If everything works, you will see the control panel login page. Later you can stop the server by pressing Ctrl + C in the terminal.

Note. Suppose your runtime uses a different domain (e.g., orchid.loc). In that case, the admin panel may not be available. You need to specify your domain in the configuration file config/platform.php or .env file. It allows you to make the admin panel available on another domain or subdomain, such as platform.example.com.

Publishing resources

By default, static files (css / js) are delivered via app routes. It is the best balance between configuration and change tracking, but you can specify web servers for distribution. To do this, you need to run a command that creates a symbolic link in the public directory. Please only use it if your web server is having problems:

php artisan orchid:link

Problems encountered during installation? It is possible that someone already had this problem https://github.com/orchidsoftware/platform/issues. If not, you can send a message or ask for help.

Updating

While in the project directory, use Composer to update the package:

composer update orchid/platform --with-dependencies

Note. You can also update all your dependencies listed in the composer.json file by running composer update.

Installing ext-dom PHP7

Posted Posted in Work

First of all, read the warning! He says don’t run composer as root! Second, you are probably using Xammp on your local machine, which has the required php libraries by default.

But on your server you are missing ext-dom. php-xml has all the required bundled packages. Thus, you can simply install it by running:

sudo apt-get update
sudo apt install php-xml

Most likely you are missing mbstring too. If you get an error, install this package also with:

sudo apt-get install php-mbstring

Then install:

composer update
composer require cviebrock/eloquent-sluggable

 

For those who want to install ext-dom on php 7.1 and above, run this command:

sudo apt install php-xml

How to insert shortcode into PHP

Posted Posted in Work

Especially for those who already know everything, but are just looking for a quick answer on how to insert a shortcode into a wordpress template or another engine, please use this code: 

 

However, don’t forget about punctuation! The quotes in your shortcode and php code must be different.

That is, if in your WordPress site template, you use the same shortcode, but with two quotes inside ([“…”]), and in your php code, you also use double quotes (“[…]”) , then you need to change one of them to single ones. It is because of such small reasons that shortcodes in wordpress often do not work.

<?php echo do_shortcode( '[your_shortcode]' ); ?>

Create tab tabs for product cards WooCommerce

Posted Posted in Work

This plugin extends to allow shop owners to add custom tabs to products. The tabs are displayed on the individual product pages to the right of the default “Description” tab.

Individual product tabs are managed on the WooCommerce Edit Product screen and can be added on a per product basis. You can also create saved tabs and add them to multiple products as needed. Tabs can be easily added, deleted and rearranged.

Tab content areas use the standard WordPress text editor and may contain text, images, HTML or shortcodes.

https://wordpress.org/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/

How it all began

Posted Posted in Work

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed venenatis dignissim ultrices. Suspendisse ut sollicitudin nisi. Fusce efficitur nec nunc nec bibendum. Praesent laoreet tortor quis velit facilisis faucibus. Maecenas sollicitudin lectus diam, non vehicula arcu ullamcorper ac. In pharetra, est vitae interdum tincidunt, urna ligula rutrum tellus, sit amet pharetra purus magna eu enim. Sed iaculis imperdiet nisi, et pulvinar mauris gravida maximus. Phasellus vitae lorem at sem mattis volutpat. In eget dictum dui. Quisque nec sapien at massa mattis semper. Ut ac malesuada turpis. Fusce eu nulla vehicula, tincidunt dui ultrices, fermentum felis. Aliquam lectus nisi, feugiat ut aliquet sed, posuere sed libero.

Pellentesque consectetur massa nec nulla fermentum, at tincidunt elit volutpat. Duis vulputate placerat tortor, sit amet eleifend mauris tincidunt sit amet. Aliquam a maximus ligula. Phasellus nec sapien sed tellus tempor eleifend id a erat. Donec convallis bibendum posuere. Quisque mollis imperdiet malesuada. Suspendisse eget dictum massa.

Phasellus ac posuere nibh, in finibus nulla. In diam arcu, luctus sit amet condimentum sit amet, tristique et leo. Sed tincidunt justo a porttitor tristique. Nulla eu metus tincidunt, ornare magna ullamcorper, semper lacus. Quisque vitae porttitor odio, id tincidunt tellus. Fusce a suscipit eros. Proin sit amet risus fermentum, lobortis quam sed, consequat velit. Quisque sit amet ultricies lorem. Phasellus scelerisque ipsum eget ipsum posuere suscipit. Proin id molestie mauris, a venenatis ipsum. Quisque efficitur, nibh a dapibus mollis, metus tortor fermentum ante, non pellentesque mi magna non leo. Integer quis sem hendrerit, euismod dolor id, dapibus nulla. Maecenas non ultrices lorem. Pellentesque lobortis, diam eget feugiat lacinia, ante augue ullamcorper tortor, vel ornare sapien lacus pharetra quam.