Comments (18)
That's weird, the class \Former\Fields\Input
does exist. Are you sure everything is up to date and no file is missing ? If so, can you show me the code you're trying to use ?
from former.
I have the latest code (as of 10 minutes ago), here's the test code.
{{ Former::horizontal_open() }}
{{ Former::xlarge_text('email') }}
{{ Former::password('password') }}
{{ Former::xlarge_text('first_name') }}
{{ Former::xlarge_text('last_name') }}
{{ Former::actions(Form::submit('Save', array('class'=>'btn btn-primary')) ) }}
{{ Former::close() }}
I have the bundle autoloaded in bundles.php and the alias in application.php. Nothing else. This is running on PHP 5.3.2
from former.
No specific former config file or anything populating the form ?
from former.
No, everything is default apart from that. Of course I also have some other bundles installed but I don't think any of those would be conflicting?
I'm unfamiliar with the autoloading functionality of PHP but could this be part of the problem?
from former.
Can you list the bundles installed and paste somewhere your application.php
file ?
from former.
To rule out any conflicts I just did the following
- Setup fresh install of Laravel from latest github
- Copied in latest version of Former from github
- Registered in bundles.php as auto true
- Added alias in application.php
- Added above form code to the default home/index.blade.php
And I get the same issue. Is there something in the server config which could be affecting it?
from former.
I'm going to try that as well, I have a PHP 5.3 server somewhere, I'll try uploading to it to see if it's a PHP error (although that would be weird as Travis tests Former on PHP 5.3 too).
Are you using Laravel master or develop branch ?
from former.
Master branch. Is there something I can do to help diagnose? Is there somewhere in the code where the types are loaded?
from former.
Just tested with fresh master on local and no error, but I'm running PHP 5.4.4 on local. Can't upload to my 5.3 server right now but I'll take a look into that.
from former.
I pushed a small commit, can you see if that changes anything ?
from former.
Still getting an error, but it's coming from the new exception you added. Here's the error message and stack trace
The class "\Former\Fields\Input" called by field "text" doesn't exist
#0 [internal function]: Former\Former::__callStatic('xlarge_text', Array)
#1 /vagrant/laravel/view.php(366) : eval()'d code(23): Former\Former::xlarge_text('email')
#2 /vagrant/laravel/view.php(366): eval()
#3 /vagrant/laravel/blade.php(71): Laravel\View->get()
#4 [internal function]: Laravel{closure}(Object(Laravel\View))
#5 /vagrant/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
#6 /vagrant/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
#7 /vagrant/laravel/view.php(337): Laravel\Event::until('laravel.view.en...', Array)
#8 /vagrant/laravel/view.php(570): Laravel\View->render()
#9 /vagrant/laravel/response.php(246): Laravel\View->__toString()
#10 /vagrant/laravel/laravel.php(178): Laravel\Response->render()
#11 /vagrant/public/index.php(34): require('/vagrant/larave...')
#12 {main}
from former.
Unfortunately, I'm also getting the same issue, I downloaded the code today and I'm on Ubuntu.
edit: I did post saying it was an issue with bootstrapper, but that's not the case...
edit2: form tags are fine but most others are giving a similar error
from former.
And what version of PHP do you run ?
from former.
PHP 5.3.2-1ubuntu4.18 with Suhosin-Patch (cli) (built: Sep 12 2012 19:12:47)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
from former.
Hm I see, so this might have something to do with the version of PHP. I'll add some more versions to the Travis build to see if anything pops up.
EDIT : Ah damn, PHP 5.3.2 is too old for Travis. Gonna have to look somewhere else.
EDIT2 : Just found something that might be relevant. I pushed the corresponding fix, can you guys see if it's better ?
from former.
Works perfectly now, thanks (and I never realised my PHP version was that old!)
from former.
Gonna wait for spib's feedback before I close this, but you know, still. VICTORY \o/
from former.
Yeah, that works for me too. Great work, thanks for the fix
from former.
Related Issues (20)
- Add method to create new field from string HOT 7
- Allow field->required() to receive a boolean HOT 1
- Allow field->inline() to receive a boolean HOT 2
- Add a Choice field type HOT 4
- Laravel 5.7 support HOT 1
- Support Bootstrap4 HOT 1
- Former Twitter Bootstrap 4 Not working HOT 2
- Custom Rule classes not working HOT 1
- Bootstrap 4 Framework uses wrong classes for input group & no classes for checkbox HOT 8
- Can Former be used outside/without Laravel? HOT 2
- Multiple attributes treated differently from single attribute in queryToArray
- Form echo like a text Laravel 5.7
- Encode checkbox value to prevent XSS attack HOT 1
- Bootstrap 4 throws error without open and close tag HOT 2
- How to style checkboxes HOT 6
- Laravel 8 support. HOT 1
- How to use vuejs directives with former HOT 2
- Former::date help HOT 1
- _method HOT 2
- How to use as a standalone PHP HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from former.