First off, thank you for considering contributing to GridView! 🎉
It's people like you that make GridView such a great tool for the Laravel community.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Style Guidelines
- Commit Message Guidelines
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Before creating bug reports, please check the existing issues as you might find out that you don't need to create one.
When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include screenshots if possible
Bug Report Template:
**Environment:**
- GridView Version: [e.g., 1.3.0]
- Laravel Version: [e.g., 10.x]
- PHP Version: [e.g., 8.2]
- Browser: [e.g., Chrome 120]
**Steps to Reproduce:**
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
**Expected Behavior:**
A clear description of what you expected to happen.
**Actual Behavior:**
A clear description of what actually happened.
**Screenshots:**
If applicable, add screenshots.
**Additional Context:**
Any other context about the problem.Feature requests are welcome! Before creating a feature request:
- Check if the feature has already been suggested
- Provide a clear and detailed explanation of the feature
- Explain why this feature would be useful
Feature Request Template:
**Is your feature request related to a problem?**
A clear description of what the problem is.
**Describe the solution you'd like:**
A clear description of what you want to happen.
**Describe alternatives you've considered:**
Any alternative solutions or features you've considered.
**Additional context:**
Add any other context or screenshots.- Fork the repository
- Create a new branch for your feature
- Make your changes
- Write or update tests
- Ensure all tests pass
- Submit a pull request
- PHP 7.3 or higher
- Composer
- Laravel 8.0 or higher
- Node.js & NPM (for asset compilation)
- Fork and Clone
git clone https://github.com/YOUR_USERNAME/gridview.git
cd gridview- Install Dependencies
composer install
npm install- Link to Local Laravel Project
# In your Laravel project
composer config repositories.gridview path ../path/to/gridview
composer require picobaz/gridview:dev-main- Run Tests
composer testgridview/
├── config/ # Configuration files
├── src/ # Source code
│ ├── Console/ # Artisan commands
│ ├── Controllers/ # HTTP controllers
│ ├── Contracts/ # Interfaces
│ ├── Traits/ # Reusable traits
│ └── helpers.php # Helper functions
├── resources/
│ ├── assets/ # JavaScript and CSS
│ └── views/ # Blade templates
├── tests/ # Test files
└── routes/ # Route definitions
- Update Documentation: If you're adding a new feature, update the README
- Write Tests: Ensure your code is covered by tests
- Follow Code Style: Run
composer formatto format your code - Update Changelog: Add your changes to CHANGELOG.md
- Test Locally: Make sure everything works in a real Laravel project
- My code follows the project's style guidelines
- I have performed a self-review of my code
- I have commented my code, particularly in hard-to-understand areas
- I have made corresponding changes to the documentation
- My changes generate no new warnings
- I have added tests that prove my fix is effective or my feature works
- New and existing unit tests pass locally with my changes
- Any dependent changes have been merged and published
## Description
Brief description of what this PR does.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## How Has This Been Tested?
Describe the tests you ran to verify your changes.
## Screenshots (if applicable):
Add screenshots to help explain your changes.
## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review
- [ ] I have commented my code where necessary
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests
- [ ] All tests passWe follow PSR-12 coding standards:
<?php
namespace Picobaz\GridView;
class Example
{
/**
* Method description
*
* @param string $parameter Description
* @return mixed
*/
public function exampleMethod(string $parameter): mixed
{
// Use camelCase for variables
$exampleVariable = 'value';
// Use type hints
return $exampleVariable;
}
}// Use ES6+ features
const exampleFunction = (parameter) => {
// Use camelCase for variables
const exampleVariable = 'value';
// Use template literals
return `Result: ${exampleVariable}`;
};
// Use arrow functions for callbacks
array.map(item => item.value);{{-- Use proper indentation --}}
<div class="example">
@if($condition)
<p>{{ $variable }}</p>
@endif
</div>
{{-- Use blade directives instead of PHP --}}
@foreach($items as $item)
<div>{{ $item->name }}</div>
@endforeachWe follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that don't affect code meaning (formatting, etc.)
- refactor: Code change that neither fixes a bug nor adds a feature
- perf: Performance improvements
- test: Adding or correcting tests
- chore: Changes to build process or auxiliary tools
feat(bulk-actions): add bulk delete functionality
Added ability to delete multiple records at once using checkboxes.
Includes UI updates and AJAX handler.
Closes #123
---
fix(inline-edit): resolve XSS vulnerability
Properly escape user input before rendering in editable cells.
---
docs(readme): update installation instructions
Added steps for Laravel 12 compatibility.- Use present tense ("add feature" not "added feature")
- Use imperative mood ("move cursor to..." not "moves cursor to...")
- First line should be 50 characters or less
- Reference issues and pull requests after the first line
- Use the body to explain what and why, not how
# Run all tests
composer test
# Run specific test file
vendor/bin/phpunit tests/Feature/GridViewTest.php
# Run with coverage
composer test-coverage<?php
namespace Tests\Feature;
use Tests\TestCase;
class GridViewTest extends TestCase
{
/** @test */
public function it_can_render_basic_grid()
{
$response = $this->get('/users');
$response->assertStatus(200);
$response->assertSee('table');
}
/** @test */
public function it_can_filter_data()
{
// Your test code
}
}When adding new features, please update:
- README.md - Main documentation
- CHANGELOG.md - Version history
- Inline Comments - Code documentation
- Examples - Add practical examples
Feel free to reach out:
- 📧 Email: picobaz3@gmail.com
- 💬 Telegram: @picobaz
- 🐛 GitHub Issues: https://github.com/PicoBaz/gridview/issues
Contributors will be recognized in:
- README.md contributors section
- CHANGELOG.md for significant contributions
- GitHub contributors graph
Thank you for contributing to GridView! 🙏