Download the PHP package estudia/inertia-uno without Composer

On this page you can find all versions of the php package estudia/inertia-uno. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package inertia-uno

InertiaUno

InertiaUno is a fancy Laravel package that provides frontend features and integrates Unocss into your Laravel project. It simplifies the process of installing InertiaJS, adding middleware, installing Lodash, and integrating UNOCSS and VUE Iconify. It also offers commands to publish views, CSS files, JS files, and Vue files.

Installation

You can install InertiaUno via Composer:

and then you can install InertiaUno and set up its frontend features, run the following command:

This command will guide you through a series of prompts to install InertiaJS, add middleware, install Lodash, UNOCSS, VUE Iconify, and publish various files. You can choose which features to install based on your project requirements.

Implementing InertiaUno in Laravel

To demonstrate how to implement InertiaUno in a Laravel project, follow these steps:

  1. Create a new controller, let's call it TestController, by running the following command:

  2. Open the TestController file in your preferred code editor and update the __invoke method to render an Inertia view. Here's an example:

    In this example, we're rendering an Inertia view named Test and passing an empty model to it. You can customize the view name and data according to your needs.

  3. Create a new Vue component file, Test.vue, in your resources/js/Pages directory. Add the following content to the file:

    This Vue component uses the ui-card component and fetches data using useModel. The component auto-imports the required files.

  4. Component Auto Importing: When you use a component, such as , InertiaUno automatically imports the corresponding Vue component file. For example, if you use <ui-card>, InertiaUno will automatically import resources/js/Components/Ui/Card.vue or resources/js/Components/Ui/Card/Index.vue, depending on the file's structure.

  5. Layout Auto Importing: Layout Auto Importing: If you add the layout attribute to the <template> tag in your Vue file, InertiaUno automatically imports the corresponding layout file. For example, <template layout="main"> will import resources/js/main.vue.

    To illustrate the layout auto-importing feature, let's take a look at an example main.vue layout file:

    In this example, the main.vue layout file defines a layout structure for your Vue components. It uses Uno CSS classes(like tailwind) to style the elements. The layout consists of a header, a main content area with a container for the content, and a footer. The <slot></slot> element allows your Vue components to be inserted dynamically into the layout's main content area. When you specify layout="main" in template tag of your your Vue page file, InertiaUno will automatically import the resources/js/main.vue layout file, providing the structure and styling defined in the layout. This allows you to maintain a consistent layout across multiple pages or components.

  6. Composable Auto Importing: When you use a composable structure, InertiaUno automatically imports the associated file. In the example above, it loads resources/js/Composables/useModel.js using the useModel composable.

    To demonstrate the composable auto-importing feature, consider the following example code:

    In this example, the useModel composable is defined in the resources/js/useModel.js file. It uses Vue Composition API functions like computed and the usePage composable from @inertiajs/vue3 to access the page's props and retrieve the model property. It also includes an asynchronous get function that you can use to perform additional asynchronous work if needed. When you use the useModel composable in your Vue file, InertiaUno automatically imports the useModel.js file, making it available for use in your application.

  7. UnoCSS Feature: InertiaUno integrates with UnoCSS, a utility-first CSS framework. Here's an example of a nice ui-card component using Tailwind CSS features:

    In this example, the ui-card component has a white background, rounded corners, and a shadow. It also displays the model ref, which was defined in the Vue file.

  8. Finally, update your routes to map the TestController to a route. Open the routes/web.php file and add the following route:

    This route maps the TestController to the /test URL.

Now, when you visit the /test URL in your Laravel application, the TestController will render the Test Vue file, which uses the `resources/js/Components/Ui/Card.vue component. The component auto-imports other components, layouts, and composable files, making it easy to work with InertiaUno in your Laravel project.

Configuration

InertiaUno publishes a configuration file that you can customize. To publish the configuration file, run:

This will create a inertia-uno.php file in your config directory, where you can modify the package's configuration options.

Available Commands

InertiaUno provides several commands to help you manage and customize your Laravel project's frontend features. Here's a list of available commands:

Technologies Used

InertiaUno utilizes the following technologies:

Roadmap

Our planned roadmap for InertiaUno includes the following features:

We welcome contributions and feedback from the community to help improve InertiaUno and make it even better!

Contributing

Contributions to InertiaUno are welcome! If you encounter any issues or have suggestions for improvement, please open an issue on the GitHub repository.

License

InertiaUno is open-source software licensed under the MIT license.


All versions of inertia-uno with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.2
illuminate/console Version ^8.0 || ^9.0 || ^10.10
js-phpize/js-phpize Version ^2.0 || ^2.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package estudia/inertia-uno contains the following files

Loading the files please wait ....