lcloss/template

Converts HTML template to Blade template and use it on Laravel Project

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:package

v1.0.10 2024-08-24 11:49 UTC

This package is auto-updated.

Last update: 2024-11-24 20:32:14 UTC


README

Other languages

Description

Do you have a template written in HTML and want to convert it to Blade, to use in a Laravel project? Then this package is for you. Its use is simple, and what you want is just the beginning to start your new Laravel project, from an HTML template. After running the php artisan template:build command, you will have your files converted.

Installation

You can install the package via composer:

composer require lcloss/template --dev

Usage

  1. To convert your HTML files to Blade, start by creating the /resources/views/templates/src directory.
  2. Copy your HTML files into the /src folder above.
  3. If the template comes with assets directory, also copy the assets folder into /src.
  4. Then, run the command:
php artisan template:build
  1. The package will create the /resources/views/templates/dist folder with the converted files.
  2. It will also create routes to view your template.

Open the browser at: http://seu-projeto.test/template This route points to index.blade.php.

If there is another file as the root, such as home.html, then open the browser at: http://seu-projeto.test/template/home

Credits

License

The MIT License (MIT). Please see License File for more information.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security-related issues, please email instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Code of Conduct

Please see CODE_OF_CONDUCT for details.

Testing

No tests have been written, as it is only intended to convert files. For a next version, I will probably add the folder configuration via .env, so you can create tests. For now, we want something very simple.