PAD Showcase
All tags/Copy

Install command

A command with a copy button - the text a value, escaped, and selected whole with one click.

1 The data copy/install_command.php php
<?php

  $command = 'pad new shop && pad serve 8000';

?>
2 The template copy/install_command.pad pad
<div style="width:100%; max-width:640px">
  <p>Add the package to your project:</p>
  {copy 'composer require pad/pad:^11.0'}
  <p>Or start a fresh application with the command-line tool:</p>
  {copy $command, label='Copy command'}
</div>
3 The result rendered on the server

Add the package to your project:

composer require pad/pad:^11.0

Or start a fresh application with the command-line tool:

pad new shop && pad serve 8000