douwu5428 2015-12-23 03:06
浏览 47

没有Eloquent和数据库迁移的Laravel?

I'm a PHP programmer for 12 years now, and pretty much re-invented the wheel many times, building my own framework for our closed-source web-app, which is offered as a hosted solution, using the same shared database for all customers.

Now I'm trying out Laravel 5 and noticed that almost every example uses Eloquent and database migrations. To me it seems these kind of things are targeted towards simple databases and people who don't like SQL or database-design (but I might be wrong).

Our MySQL database contains 100+ tables, a lot of stored procedures and many triggers which I just can't imagine doing in an ORM. We use Navicat for database-design and testing SQL-queries. For upgrading the database to a newer version of the app, we already wrote some nice scripts and even visual tools.

So basically my question is if Laravel is really intended to be used with Eloquent and migrations or that I'm really missing out a lot of functionality without them.

What do you recommend?

  • 写回答

3条回答 默认 最新

  • douyou7072 2015-12-23 03:29
    关注

    Its upto you,

    Laravel migration is aimed for keeping database version (while using version controller) also the eloquent is aimed for simple relation mapping between tables for complex situations like multiple Join and all its not recommended due to performance issue then you can choose Query Builder it gives much better performance , You need to write plain query in Laravel use \DB::statement();

    The Laravel is a perfect match for Angular Js, more Laravel is just a wrapper of few nice PHP components that is capable for providing rapid results.

    hope it helps..

    评论

报告相同问题?

悬赏问题

  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线