Download the PHP package abdullah-mateen/laravel-helping-metarial without Composer
On this page you can find all versions of the php package abdullah-mateen/laravel-helping-metarial. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abdullah-mateen/laravel-helping-metarial
More information about abdullah-mateen/laravel-helping-metarial
Files in abdullah-mateen/laravel-helping-metarial
Package laravel-helping-metarial
Short Description Laravel helper functions and general helping material
License MIT
Informations about the package laravel-helping-metarial
Laravel Helping Material
This package is a collection of useful tools for Laravel developers. It includes helper functions for common tasks, enums for defining constants, helpful traits for models and controllers, laravel validation rules for custom validations, and a simple media upload library for handling file uploads. This package aims to make Laravel development easier and faster.
Table of contents
- Getting Started
- Prerequisites
- Installation
- Publish
- Usage
- Enums
- Helpers
- Interface
- Middleware
- Models
- Resources
- Resources
- Rules
- Simple Media Library
- Simple Media Library
- Authors
- License
Getting Started
This package offers a variety of features to enhance your web development experience. Some of the features are:
- Enums: Define and use enum types in your code for better readability and consistency.
- Helpers: Use handy functions and macros to simplify common tasks and operations.
- Colors Interface: A list of colors classes and RGBA codes.
- Authorization Middleware: Protect your routes and controllers with customizable authorization logic.
- General Model: Use a base model class that provides common functionality and traits for your models.
- Helpful Css: Apply some useful css classes to your elements (if you are not using tailwind).
- Validation Rules: Validate your data with custom rules and messages.
- Some Helpful Traits: Use traits to add behavior and functionality to your enums, classes and controllers.
- Simple Media Library: Manage your media files and attachments with ease.
This package is designed to help you with your web development projects. We hope you find it useful and enjoyable.
Prerequisites
(Back to top)
This project requires PHP (version 8.1 or later)
you can use xampp, wamp, laragon or any other option that is suitable to you, they are really easy to install. To make sure you have them available on your machine, try running the following command.
Installation
(Back to top)
Require this package with composer using the following command:
Publish
(Back to top)
You can use the publish command to publish all the files. This will allow you to modify the files as you wish. To publish your files, you need to execute this command in PowerShell
, cmd
or any other terminal
.
Once you run the above command it will display a menu of files to publish. You can select one or more files by typing their numbers separated by commas, as shown below:
Usage
Enums
(Back to top)
This package is using php
default enums which are available from (PHP 8 >= 8.1.0)
onward.
Dir | Enums | Description |
---|---|---|
Media | MediaDiskEnum MediaTypeEnum |
Both enums are related to Media model which is also included in this package.Mostly used in Simple Media Library which is documented below |
User | AccountStatusEnum GenderEnum RoleEnum |
These enums are related to User model which are mostly/commonly used wherever there is a user |
StatusEnum | General Status enum like to manage active/inactive statuses of a model |
Example
Note: if you are going to use these enums as values then you don't need to cast them to enums.
Helpers
(Back to top)
list of helper functions will be available soon. For now you can have a look at available functions here
The helper functions are not automatically registered by default. To utilize these helper functions, you must first publish them using the command php artisan lhm:publish
and select the helper functions options. Afterward, navigate to your composer.json
file and perform the following steps:
Finally, run the command composer dump-autoload
or its shorthand composer du
in your current directory terminal.
Example
Interface
(Back to top)
Interface | Description |
---|---|
ColorsInterface | This interface contain a list of color classes and color codes of those classes for this you also need sass file which contain those classes.That sass file is included in this package |
Example
you can see another examples in-use in Enums here
Middleware
(Back to top)
Middleware | usage | Description |
---|---|---|
AuthorizationMiddleware | authorize:1001,3001,5001 |
This middleware is used to authorize users based on their levels. |
The middleware is pre-registered, but if you have published it using the command php artisan lhm:publish
and selected the middleware option, you will receive an overridden file for the same middleware. In such cases, it's necessary to manually register the middleware. To do so, follow these steps in the app\Http\Kernel.php
file:
Example
take a look at AuthorizationMiddleware here
Models
(Back to top)
Resources
(Back to top)
Rules
(Back to top)
Simple Media Library
(Back to top)
//: # ()
//: # ()
Author
(Back to top)
License
(Back to top)
The MIT License (MIT) 2024 - Abdullah Mateen. Please have a look at the LICENSE.md for more details.
All versions of laravel-helping-metarial with dependencies
ext-curl Version *
ext-intl Version *
ext-json Version *
ext-fileinfo Version *
ext-simplexml Version *
intervention/image Version ^3.3